WordPress.org

Forums

Redirection
Notice: has_cap was called with an argument that is deprecated since version 2.0 (1 post)

  1. tim-lar
    Member
    Posted 11 months ago #

    After enabling wp_debug = true in wp-config, I received this error when activating redirection:

    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 /var/public_html/wp-includes/functions.php on line 3193

    Easy enough to fix, find this line on redirects\index.php

    add_options_page(
    'Redirects',
    'Redirects',
    10,
    $this->slug,
    array($this, 'options')
    );

    and change it to

    add_options_page(
    'Redirects',
    'Redirects',
    'manage_options',
    $this->slug,
    array($this, 'options')
    );

    note that the only thing that has changed is "10" is now "manage_options" - I believe "10" was the old standard for roles.

    https://wordpress.org/plugins/redirection/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.