• Resolved Ambyomoron

    (@josiah-s-carberry)


    Every admin page displays the message:

    <strong>Notice</strong>: has_cap was called with an argument that is <strong>deprecated</strong> since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead. in <b>/home/web/wp-includes/functions.php</b> on line <b>4030</b>

    Since this is a core WP file, is it something about which one should be concerned, or is it just something that no one has gotten around to fixing yet?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @josiah-s-carberry,

    Have you tried de-activating your plugins, to see if that removes the error-message?
    If it does, which I think it will, it has something to do with one of your plugins.

    Try to narrow it down to which plugin exactly is causing this error – and then contact the developers.

    I’ve seen this error before, and it has always been a plugin that was causing it ??

    Best regards
    Aris Kuckovic

    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    Yes, you’re right, Aris. I found the plugin concerned. Unfortunately, it is an abandoned plugin so any fix will have to be done by myself.

    The problem now is to interpret the message “Usage of user levels is deprecated. Use capabilities instead.” How can I determine what deprecated functions concerns user levels?

    I found the codex page that describes all the user levels, but I can’t a description of the functions that were used to manage those user levels

    @josiah-s-carberry

    Hmm, instead of starting to change the code by yourself, I would suggest using a new and maintained plugin like User Role Editor

    I’ve used it quite some times, it′s easy, flexible and gets the job done ??

    Best regards
    Aris Kuckovic

    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    Thanks for that tip, Aris.
    I’m not sure that plugin will be of any use to me. The plugin causing my issue has nothing to do with managing user roles and capabilities. It has a completely different purpose, but it happens to make a call to that deprecated user level function. Unless the plugin you suggest filters that call and replaces it with a call to an equivalent capabilities function, it will not help me.
    So, my question still stands. Where can I find a list of the deprecated user level functions?

    @josiah-s-carberry

    Ah I see.
    Well, then I can’t help you, unfortunately.
    I have no insight in the plugin what so ever.
    I’ve found the same page in the coodex, as you mention above – but no further explenation.

    I hope you find a fix ??

    Best regards
    Aris Kuckovic

    Eu recebi a mesma mensagem em meu blog https://consultafgts.com.br

    otice: has_cap foi chamado com um argumento que está obsoleto desde a vers?o 2.0.0! Usage of user levels is deprecated. Use capabilities instead. in /home/76379-65642.cloudwaysapps.com/uytgmvcpcd/public_html/wp-includes/functions.php on line 4031

    Só aparece no painel de administra??o. Aparece aí pra vocês ?

    • This reply was modified 6 years, 10 months ago by Neto.
    • This reply was modified 6 years, 10 months ago by Neto.
    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    Yes, Aposentadorias.com.br, it is the same. If you learn how to resolve this, please share your solution.

    Thread Starter Ambyomoron

    (@josiah-s-carberry)

    Here is the solution I found and implemented:

    The plugin has a call to the function add_options_page in which the third parameter was given as an integer. This integer needed to be replaced by the name of a capability, which are listed in https://codex.www.ads-software.com/Roles_and_Capabilities#Capabilities

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘has_cap was called with an argument…’ is closed to new replies.