[wp-trac] [WordPress Trac] #18856: use of the deprecated function 'add_contextual_help' in /wp-includes/functions.php
WordPress Trac
wp-trac at lists.automattic.com
Tue Oct 4 11:22:21 UTC 2011
#18856: use of the deprecated function 'add_contextual_help' in /wp-
includes/functions.php
--------------------------+-----------------------------
Reporter: d3395 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 3.3
Severity: normal | Keywords: needs-patch
--------------------------+-----------------------------
Hi,
i am getting the following Message at the top of the Plugins Page:
{{{
Notice: add_contextual_help is deprecated since version 3.3! Use
$current_screen->add_help_tab() instead. in /path/to/htdocs/wordpress/wp-
includes/functions.php on line 3415
}}}
i searched the code and found at row 325 the add_contextual_help function:
{{{
add_contextual_help( $current_screen, '
<p>' . __('Plugins extend and expand the functionality of WordPress. Once
a plugin is installed, you may activate it or deactivate it here.') .
'</p>
<p>' . sprintf(__('You can find additional plugins for your site by using
the <a href="%1$s">Plugin Browser/Installer</a> functionality or by
browsing the <a href="%2$s" target="_blank">WordPress Plugin Directory</a>
directly and installing new plugins manually. To manually install a plugin
you generally just need to upload the plugin file into your <code>/wp-
content/plugins</code> directory. Once a plugin has been installed, you
can activate it here.'), 'plugin-install.php',
'http://wordpress.org/extend/plugins/') . '</p>
<p>' . __('Most of the time, plugins play nicely with the core of
WordPress and with other plugins. Sometimes, though, a plugin’s code
will get in the way of another plugin, causing compatibility issues. If
your site starts doing strange things, this may be the problem. Try
deactivating all your plugins and re-activating them in various
combinations until you isolate which one(s) caused the issue.') . '</p>
<p>' . sprintf( __('If something goes wrong with a plugin and you
can’t use WordPress, delete or rename that file in the
<code>%s</code> directory and it will be automatically deactivated.'),
WP_PLUGIN_DIR) . '</p>
<p><strong>' . __('For more information:') . '</strong></p>
<p>' . __('<a
href="http://codex.wordpress.org/Managing_Plugins#Plugin_Management"
target="_blank">Documentation on Managing Plugins</a>') . '</p>
<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support
Forums</a>') . '</p>' );
}}}
This have to be replaced with $current_screen->add_help_tab() :
{{{
$current_screen->add_help_tab( $current_screen, '
<p>' . __('Plugins extend and expand the functionality of WordPress. Once
a plugin is installed, you may activate it or deactivate it here.') .
'</p>
<p>' . sprintf(__('You can find additional plugins for your site by using
the <a href="%1$s">Plugin Browser/Installer</a> functionality or by
browsing the <a href="%2$s" target="_blank">WordPress Plugin Directory</a>
directly and installing new plugins manually. To manually install a plugin
you generally just need to upload the plugin file into your <code>/wp-
content/plugins</code> directory. Once a plugin has been installed, you
can activate it here.'), 'plugin-install.php',
'http://wordpress.org/extend/plugins/') . '</p>
<p>' . __('Most of the time, plugins play nicely with the core of
WordPress and with other plugins. Sometimes, though, a plugin’s code
will get in the way of another plugin, causing compatibility issues. If
your site starts doing strange things, this may be the problem. Try
deactivating all your plugins and re-activating them in various
combinations until you isolate which one(s) caused the issue.') . '</p>
<p>' . sprintf( __('If something goes wrong with a plugin and you
can’t use WordPress, delete or rename that file in the
<code>%s</code> directory and it will be automatically deactivated.'),
WP_PLUGIN_DIR) . '</p>
<p><strong>' . __('For more information:') . '</strong></p>
<p>' . __('<a
href="http://codex.wordpress.org/Managing_Plugins#Plugin_Management"
target="_blank">Documentation on Managing Plugins</a>') . '</p>
<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support
Forums</a>') . '</p>' );
}}}
Ralf
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18856>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list