From a16fe7f86f7cbfcfe8fafb59127f000fefcd777b Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 1 Dec 2011 03:29:55 +0000 Subject: [PATCH] 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 --- wp-admin/includes/deprecated.php | 22 ++++++++++++++++++++++ wp-admin/includes/screen.php | 19 ------------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php index efe155778..f38bafc76 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -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 ); +} \ No newline at end of file diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php index 0f37c8c2a..a31a9b9e0 100644 --- a/wp-admin/includes/screen.php +++ b/wp-admin/includes/screen.php @@ -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 *