Bug: has_cap was called with an argument that is deprecated…
-
With
define('WP_DEBUG', true);
inwp-config.php
an error can be observed on all WordPress backend-pages and in settings menu if the plugin is installed and active: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. in [redacted]/wp-includes/functions.php on line 2925
Reason is deprecated use of
$capability
parameter in add_options_page() call in filewp-email-capture/inc/options.php
, starting at line 3:Wrong:
function wp_email_capture_menus() { add_options_page(__('WP Email Capture Options','WPEC'), 'WP Email Capture', 8, 'wpemailcaptureoptions', 'wp_email_capture_options'); }
Suggested fix:
function wp_email_capture_menus() { add_options_page(__('WP Email Capture Options','WPEC'), 'WP Email Capture', 'activate_plugins', 'wpemailcaptureoptions', 'wp_email_capture_options'); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Bug: has_cap was called with an argument that is deprecated…’ is closed to new replies.