Notice: has_cap was called with an argument that is deprecated
-
When I activate this plugin I get:
Notice: has_cap was called with an argument that is deprecated since version 2.0!
Since my client likes the plugin, I fixed this part of the plugin. Maybe it’s helpful for other users too:
Look for this line in the code:
add_options_page( ‘Smart 404’, ‘Smart 404’, 5, __FILE__, ‘smart404_options_page’ );replace it with this:
add_options_page( ‘Smart 404’, ‘Smart 404’, ‘manage_options’, __FILE__, ‘smart404_options_page’ );
It’s just replacing the deprecated number argument “5” with a string “manage_options” which is the logical capability you need to add an options page.
Please let me know if I may be wrong or if it can be improved.
- The topic ‘Notice: has_cap was called with an argument that is deprecated’ is closed to new replies.