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

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 12 15:07:57 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 garyc40):

 I got the same issue as mdawaffe described.

 It turns out that whenever you create an instance of WP_Screen, it
 overwrites the `$typenow` and `$taxnow` global variables.

 Attached below is a patch that fixes this. `$typenow` and `$taxnow` are
 supposed to be modified only when WP_Screen::set_current_screen() is
 called.

 Also I refactored a bunch of spaghetti lines that deals with 'edit-xxx',
 'edit-tags' and 'edit.php'.

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


More information about the wp-trac mailing list