WordPress.org

Ready to get started?Download WordPress

Forums

WP Email Capture
[resolved] Bug: has_cap was called with an argument that is deprecated... (2 posts)

  1. Ov3rfly
    Member
    Posted 10 months ago #

    With define('WP_DEBUG', true); in wp-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 file wp-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');
    }

    http://wordpress.org/extend/plugins/wp-email-capture/

  2. Rhys Wynne
    Member
    Plugin Author

    Posted 9 months ago #

    Resolved as it's been updated in 2.7.7

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.