• Resolved BenLinders

    (@benlinders)


    Hi,

    I got a warning in my debug.log that contextual_help is used which is deprecated. A search with String Locator showed line 135 in error-log-monitor/scb/AdminPage.php

    add_filter( ‘contextual_help’, array( $this, ‘_contextual_help’ ), 10, 2 );

    Can you please update the plugin? Thanks!

    Ben Linders

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Thank you for the report! However, are you entirely sure that there were no other search results? I ask this because the code in that file should normally never be executed, so it wouldn’t trigger a warning.

    The file is part of a third-party library. Error Log Monitor uses some features of that library, but it doesn’t use that particular file because it doesn’t have any admin pages; it just has a dashboard widget.

    Thread Starter BenLinders

    (@benlinders)

    I searched through all my plugins for contextual_help and the code from error log monitor is the only one that showed up using it. There are no other search results.

    Any guidance on how I can be sure that it’s error log monitor or not?

    Ben Linders

    Plugin Author Janis Elsts

    (@whiteshadow)

    I guess you could either temporarily deactivating the plugin, or you could manually edit the AdminPage.php file and comment out the offending line like this:

    //add_filter( 'contextual_help', array( $this, '_contextual_help' ), 10, 2 );

    Then see if the warnings stop showing up.

    Thread Starter BenLinders

    (@benlinders)

    I commented out the line, will follow up if the warning is still there or not.

    Thanks!

    Ben Linders

    Thread Starter BenLinders

    (@benlinders)

    The warning is still there, so it has to be another plugin as the code in AdminPage.php is commented out.

    Apologies for wrongly raising the issue.

    Plugin Author Janis Elsts

    (@whiteshadow)

    All right, I’ll mark this as resolved then.

    drivebass

    (@drivebass)

    I get the same error: “Deprecated: contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead. in /Users/admin/Sites/klikkentheke/wp-includes/functions.php on line 5152”

    I tried to deactivate all my plugins but it still displays the error
    The error stops displaying when deactivating the plugin or when commenting out line 136 at error-log-monitor/scb/AdminPage.php

    // add_filter( ‘contextual_help’, array( $this, ‘_contextual_help’ ), 10, 2 );

    Plugin Author Janis Elsts

    (@whiteshadow)

    All right then, I’ll remove that code entirely and release an update. If you ever deactivate Error Log Monitor, chances are that you will start seeing the same deprecation notice from the plugin or theme that actually used scbAdminPage.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Usage of filer with contextual_help, deprecated’ is closed to new replies.