Admin pages created by Plugins get permissions errors
|Reported by:||mattyrob||Owned by:||anonymous|
In my plugin I have the following line:
add_submenu_page('profile.php', ('Subscriptions', 'subscribe2'), ('Subscriptions', 'subscribe2'), "read", FILE, array(&$this, 'user_menu'));
This adds a submenu to profile.php so users can manage email subscriptions.
Since 2.0.6 it is no longer working - the menu is available but clicking on it gives an error message:
"You do not have sufficient permissions to access this page."
From my back tracking through the WP code, it appears that the issue arises in the user_can_access_admin_page() function. I haven't figured out a fix other than hacking out the if statement at the end of menu.php.