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

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 12 06:11:49 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:  needs-patch     |
----------------------------+-----------------------

Comment (by mdawaffe):

 Replying to [comment:50 nacin]:
 > In [18943]:
 > {{{
 > #!CommitTicketReference repository="" revision="18943"
 > Store screen help and options as static data against WP_Screen.
 Individual screen objects no longer hold data it can't re-generate on
 construction or otherwise fetch. convert_to_screen() now returns a
 WP_Screen object. Various globals are gone. Introduces
 WP_Screen::get_option(). Allows for a formal factory to be introduced
 later. see #18785.
 > }}}

 This breaks plugins that add menus and call {{{convert_to_screen()}}}.
 One such plugin is NextGEN Gallery 1.8.3
 http://wordpress.org/extend/plugins/nextgen-gallery/

 {{{$GLOBALS['typenow']}}} can get inappropriately overwritten during
 {{{WP_Screen::__construct()}}} during a {{{convert_to_screen()}}} call
 which breaks {{{$the_parent}}} in wp-admin/admin.php.

 Attached is a test case.

 1. Disable all plugins.
 2. Enable the test case plugin "Two Top Level Menus [18943]"
 3. Try to access both new top level menus and each submenu of those two
 new top level menus.

 Everything works in r18942, the submenus break in r18943.

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


More information about the wp-trac mailing list