Code Hacks: WordPress WP-Filebase Pro

I updated my WordPress installations to 3.7 “Basie” this weekend and found that the file download stopped working for all users except admins. The files affected are those for which permissions are required (Subscriber and above).

I made a workaround to get it working for my physics teachers resource site at http://sptr.net. In classes/Item.php, within function CurUserCanAccess($for_tpl=false, $user = null), above the loop that checks user roles, you have to populate the roles array by calling get_role_caps(), thus:

...
if(empty($frs)) return true; // item is for everyone!
$user->get_role_caps();
foreach($user->roles as $ur) { // check user roles against item roles
 if(in_array($ur, $frs))
 return true;
 }
...

It looks like it’s working for now. I’ve posted the fix to the Plugin support forum.