Deprecate add_contextual_help() for get_current_screen()->add_help_tab(). fixes #19020.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-12-01 03:29:55 +00:00
parent 74e1b3ea68
commit a16fe7f86f
2 changed files with 22 additions and 19 deletions

View File

@ -859,3 +859,25 @@ function type_url_form_file() {
__deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('file')" );
return wp_media_insert_url_form( 'file' );
}
/**
* Add contextual help text for a page.
*
* Creates an 'Overview' help tab.
*
* @since 2.7.0
* @deprecated 3.3.0
* @deprecated Use get_current_screen()->add_help_tab()
* @see WP_Screen
*
* @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
* @param string $help The content of an 'Overview' help tab.
*/
function add_contextual_help( $screen, $help ) {
_deprecated_function( __FUNCTION__, '3.3', 'get_current_screen()->add_help_tab()' );
if ( is_string( $screen ) )
$screen = convert_to_screen( $screen );
WP_Screen::add_old_compat_help( $screen, $help );
}

View File

@ -107,25 +107,6 @@ function get_hidden_meta_boxes( $screen ) {
return apply_filters( 'hidden_meta_boxes', $hidden, $screen, $use_defaults );
}
/**
* Add contextual help text for a page.
*
* Creates an 'Overview' help tab.
*
* @since 2.7.0
*
* @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
* @param string $help The content of an 'Overview' help tab.
*
* @todo: deprecate?
*/
function add_contextual_help( $screen, $help ) {
if ( is_string( $screen ) )
$screen = convert_to_screen( $screen );
WP_Screen::add_old_compat_help( $screen, $help );
}
/**
* Register and configure an admin screen option
*