[wp-trac] [WordPress Trac] #18785: Modernize screen functions

WordPress Trac wp-trac at lists.automattic.com
Sun Oct 23 19:19:59 UTC 2011


#18785: Modernize screen functions
------------------------------+-----------------------
 Reporter:  nacin             |       Owner:  nacin
     Type:  task (blessed)    |      Status:  assigned
 Priority:  normal            |   Milestone:  3.3
Component:  Administration    |     Version:  3.3
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+-----------------------

Comment (by scribu):

 Replying to [comment:57 nacin]:
 > It makes WP_Screen behave as a registry of singletons.

 '[http://en.wikipedia.org/wiki/Singleton_pattern Singleton]' does not
 accept plural form. :)

 What the patch does is store all the WP_Screen instances in a static
 property on the WP_Screen class.

 Maybe this:

 {{{
 $screen = WP_Screen::get( $hook_name );
 $screen->set_current_screen();
 }}}

 could be replaced with this:

 {{{
 WP_Screen::get( $hook_name )->set_as_current();
 }}}

 to keep with our coding standards.

 +1 otherwise.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18785#comment:58>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list