[Plugin: NextGEN Gallery Search] Fixing has_cap notice error
-
Hello Marco and fellow WordPress users,
I’m dropping by to point out that there’s a tiny bug in the plugin which, while not world breaking, can be the source of some annoying notices when you’re using the WP-Debug mode.
The notice in question is:
Notice: 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.
And the fix is very simple:
Open the /wp-content/plugins/nextgen-gallery-search/nextgen-gallery-search.php file and on line 17, replace the 8 with
'manage_options'
So the full line, after the edit, will need to look like this:
add_menu_page('Gallery Search', 'Gallery Search', 'manage_options', __FILE__, 'ngs_search_page');
The reason for this change is that WordPress no longer likes numeric values for admin checks when it comes to menus.
https://www.ads-software.com/extend/plugins/nextgen-gallery-search/
- The topic ‘[Plugin: NextGEN Gallery Search] Fixing has_cap notice error’ is closed to new replies.