WordPress.org

Ready to get started?Download WordPress

Forums

Editable Comments
has_cap was called with an argument that is deprecated since version 2.0 (2 posts)

  1. travelvice
    Member
    Posted 3 years ago #

    This plugin is throwing the following error in the admin menu:

    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.

    The offending function is:

    function admin_menu(){
      add_options_page('Editable Comments', 'Editable Comments', 8, 'editable-comments.php',array(&$this,'adminpage'));
    }

    Passing '8' as a permissions level is no more. This value should be a string. Since I'm the only user I've replaced 8 with 'read' and the error clears up nicely.

    add_options_page('Editable Comments', 'Editable Comments', 'read', 'editable-comments.php',array(&$this,'adminpage'));

  2. superbibi
    Member
    Posted 2 years ago #

    thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic