mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
Don't instantiate WP_Screen in convert_to_screen() for now. see #18785.
git-svn-id: https://develop.svn.wordpress.org/trunk@18949 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c75c11d59b
commit
bdc8ac11ea
@ -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…
x
Reference in New Issue
Block a user