Deprecated: contextual_help is deprecated since version 3.3.0 in WordPress

This deprecation message on WordPress related to contextual_help can be due to any old plugin or theme that is activated in your WordPress site.

The resolution for that issue is also mentioned in that same deprecation message, but the challenge would be to identify the plugin or theme that still relies on that method. One option is to disable the plugins one by one to identify the problematic plugin and the other option is to search for this function name across all plugins and take corrective measures.

To recursively search all files for a word in a folder and its children, execute the below command in the terminal from the WordPress plugins folder.

This would recursively search for the word “contextual_help” in all files in the plugins folder and returns the line number and the line that contains the matching word.

# matches the lines that contain the word
$ grep -Rin ./ -e "contextual_help"

# exact word match
$ grep -Rwin ./ -e "contextual_help"

# removing the arg "i" makes the search case-sensitive

This code would help us to easily identify the problematic plugin. In most cases, commenting that line would be sufficient to address the issue as this is just a hook to invoke a context-specific help message for that plugin.

Leave a comment