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:
Andrew Nacin 2011-10-12 16:22:50 +00:00
parent c75c11d59b
commit bdc8ac11ea
1 changed files with 4 additions and 7 deletions

View File

@ -231,7 +231,7 @@ function convert_to_screen( $screen ) {
$screen .= '-user';
$screen = (string) apply_filters( 'screen_meta_screen', $screen );
$screen = new WP_Screen( $screen );
$screen = (object) array( 'id' => $screen, 'base' => $screen );
return $screen;
}
@ -248,10 +248,7 @@ function convert_to_screen( $screen ) {
* @todo: deprecate?
*/
function add_contextual_help( $screen, $help ) {
if ( is_string( $screen ) )
$screen = convert_to_screen( $screen );
$screen->add_old_compat_help( $help );
WP_Screen::add_old_compat_help( $screen, $help );
}
/**
@ -560,8 +557,8 @@ final class WP_Screen {
self::$_options[ $this->id ] = array();
}
function add_old_compat_help( $help ) {
self::$_old_compat_help[ $this->id ] = $help;
static function add_old_compat_help( $screen, $help ) {
self::$_old_compat_help[ $screen ] = $help;
}
/**