WordPress.org

Make WordPress Core

Changeset 18949


Ignore:
Timestamp:
10/12/2011 04:22:50 PM (10 years ago)
Author:
nacin
Message:

Don't instantiate WP_Screen in convert_to_screen() for now. see #18785.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/screen.php

    r18945 r18949  
    232232
    233233    $screen = (string) apply_filters( 'screen_meta_screen', $screen );
    234     $screen = new WP_Screen( $screen );
     234    $screen = (object) array( 'id' => $screen, 'base' => $screen );
    235235    return $screen;
    236236}
     
    249249 */
    250250function add_contextual_help( $screen, $help ) {
    251     if ( is_string( $screen ) )
    252         $screen = convert_to_screen( $screen );
    253 
    254     $screen->add_old_compat_help( $help );
     251    WP_Screen::add_old_compat_help( $screen, $help );
    255252}
    256253
     
    561558    }
    562559
    563     function add_old_compat_help( $help ) {
    564         self::$_old_compat_help[ $this->id ] = $help;   
     560    static function add_old_compat_help( $screen, $help ) {
     561        self::$_old_compat_help[ $screen ] = $help;
    565562    }
    566563
Note: See TracChangeset for help on using the changeset viewer.