If you run eShop 6.2.10 with DEBUG true (in wp-config.php) in WP 3.3 then the admins screens will load up about a dozen repetitions of this warning:
Notice: add_contextual_help is deprecated since version 3.3! Use get_current_screen()->add_help_tab() instead. in …/wp-includes/functions.php on line 3458
If you enjoy debug mode then this is annoying. The fix is a tiny bit more the warning indicates, so I made a pretty safe helper function. Two files to patch:
// add_contextual_help($paged,$help); // deprecated 3.3 my_add_contextual_help($paged,$help);
// add_contextual_help($this->pagehook, $help); // deprecated 3.3 my_add_contextual_help($this->pagehook,$help);
(This is minimal. In my eshop, I actually wrapped them with “if (function_exists()”.)
The new function is here: http://pastebin.com/TshW8KxA
It’s only a few lines, and is formatted as an mu-plugin.
The least obvious step is
$screen = convert_to_screen( $screen );
The name ‘my_…’ is sort of example code, but it does work.
- The topic ‘[Plugin: eShop] Debug warning: add_contextual_help deprecated’ is closed to new replies.