[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern

WordPress Trac noreply at wordpress.org
Tue Aug 30 20:06:31 UTC 2016


#37699: Death to Globals Episode #1: A Registry, A Pattern
----------------------------+------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  4.7
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------

Comment (by wonderboymusic):

 In [changeset:"38455"]:
 {{{
 #!CommitTicketReference repository="" revision="38455"
 List Tables: AJAX actions for List Tables do not need to declare `global
 $wp_list_table`. List tables on admin screens are in global scope, and
 they contain hooks that don't pass the the list table as context, hence
 using globals there so that functions can import them. That problem does
 not exist in the AJAX actions, which are virtually impossible to hook into
 as is.

 See #37699.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37699#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list