• Resolved Andrej Pavlovic

    (@andrejpavlovic)


    I get the following warning when running admin with DEBUG flag on:

    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 …\site\wp-includes\functions.php on line 3193

    Changing the following:

    public function adminMenu()
        {
            add_options_page(
                'Search Exclude',
                'Search Exclude',
                10,
                'search_exclude',
                array($this, 'options')
            );
        }

    to:

    public function adminMenu()
        {
            add_options_page(
                'Search Exclude',
                'Search Exclude',
                'manage_options',
                'search_exclude',
                array($this, 'options')
            );
        }

    fixes the issue.

    https://ww.wp.xz.cn/plugins/search-exclude/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor pronskiy

    (@pronskiy)

    Hi Andrej!

    Thank you for report and solution! Will have a look and push the update soon.

    Plugin Contributor pronskiy

    (@pronskiy)

    Hi Andrej!
    Just letting you know that I’ve just pushed version 1.1.0 with fix suggested by you.
    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Deprication warning’ is closed to new replies.