mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-01 00:27:38 +02:00
Don't instantiate WP_Screen in convert_to_screen() for now. see #18785.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0d8b1bdc51
commit
aa06a7de9f
@ -231,7 +231,7 @@ function convert_to_screen( $screen ) {
|
|||||||
$screen .= '-user';
|
$screen .= '-user';
|
||||||
|
|
||||||
$screen = (string) apply_filters( 'screen_meta_screen', $screen );
|
$screen = (string) apply_filters( 'screen_meta_screen', $screen );
|
||||||
$screen = new WP_Screen( $screen );
|
$screen = (object) array( 'id' => $screen, 'base' => $screen );
|
||||||
return $screen;
|
return $screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,10 +248,7 @@ function convert_to_screen( $screen ) {
|
|||||||
* @todo: deprecate?
|
* @todo: deprecate?
|
||||||
*/
|
*/
|
||||||
function add_contextual_help( $screen, $help ) {
|
function add_contextual_help( $screen, $help ) {
|
||||||
if ( is_string( $screen ) )
|
WP_Screen::add_old_compat_help( $screen, $help );
|
||||||
$screen = convert_to_screen( $screen );
|
|
||||||
|
|
||||||
$screen->add_old_compat_help( $help );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -560,8 +557,8 @@ final class WP_Screen {
|
|||||||
self::$_options[ $this->id ] = array();
|
self::$_options[ $this->id ] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_old_compat_help( $help ) {
|
static function add_old_compat_help( $screen, $help ) {
|
||||||
self::$_old_compat_help[ $this->id ] = $help;
|
self::$_old_compat_help[ $screen ] = $help;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user