[wp-trac] [WordPress Trac] #21871: Reduce reliance on global variables in list tables

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 22 18:01:33 UTC 2012


#21871: Reduce reliance on global variables in list tables
----------------------------+-----------------------
 Reporter:  ryan            |       Owner:  ryan
     Type:  enhancement     |      Status:  reopened
 Priority:  normal          |   Milestone:  3.5
Component:  Administration  |     Version:  3.4
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |
----------------------------+-----------------------

Comment (by scribu):

 So, in the admin page, you'd do:

 {{{
 $screen = WP_Screen::get_instance( basename(__FILE__), $_GET );
 }}}

 and in an AJAX request, you'd do:

 {{{
 $screen = WP_Screen::get_instance( $_POST['admin_file'],
 $_POST['admin_file_args'] );
 }}}

 Or something along those lines.

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


More information about the wp-trac mailing list