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

WordPress Trac noreply at wordpress.org
Wed Aug 31 17:55:16 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 jeremyfelt):

 Replying to [comment:54 nacin]:
 > Replying to [comment:37 wonderboymusic]:
 > > In [changeset:"38388"]:
 > > {{{
 > > #!CommitTicketReference repository="" revision="38388"
 > > Multisite: move `get_current_site()` to `load.php` so that it can be
 used in more places, instead of importing `global $current_site`.
 > >
 > > See #37699.
 > > }}}
 >
 > This made a multisite-only function accessible in single-site. I don't
 think that should have been intended, if it was. cc @wonderboymusic,
 @jeremyfelt.

 Yes, this change has more impact than reducing the use of a global. I'm
 not sure that anything really holds us back from doing it (see
 @johnjamesjacoby's comment), but I'd like rather discuss the decision and
 possible consequences in a new ticket.

 Previously #25158

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


More information about the wp-trac mailing list