[Plugin: SimpleModal Login] Bug Fix (when WP_DEBUG is enabled)
-
Hello
I’m a fellow WP plugin developer. I love the plugin, it’s perfect for my needs. My test environment has WP_DEBUG set to true, which throws up an error with your plugin.
<strong>Notice:</strong> has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /Applications/MAMP/htdocs/mobilebeauty/wp-includes/functions.php on line 3321
However, I have fixed it and thought you might appreciate the fix to include in your next release.
On line 121, in function admin_menu_link():
Change 10 to ‘manage_options’. This removes the reliance on the old has_cap() function.
Before:
add_options_page('SimpleModal Login', 'SimpleModal Login', 10, basename(__FILE__), array(&$this, 'admin_options_page'));
After:
add_options_page('SimpleModal Login', 'SimpleModal Login', 'manage_options', basename(__FILE__), array(&$this, 'admin_options_page'));
I’ve had to do this with all my plugins too ??
Thanks again!
Dan
- The topic ‘[Plugin: SimpleModal Login] Bug Fix (when WP_DEBUG is enabled)’ is closed to new replies.