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

WordPress Trac noreply at wordpress.org
Wed Aug 31 14:38:20 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 johnjamesjacoby):

 > This made a multisite-only function accessible in single-site. I don't
 think that should have been intended.

 FWIW, I see no harm in this.

 * More predictably environment for plugins & themes
 * `get_current_blog_id()` and `get_current_network_id()` are already in
 `load.php`
 * Hypothetically, these could all live in `ms-load.php`, but I have a
 hunch that will require a few additional `is_multisite()` checks to avoid
 fatals (would need to try it to see what breaks)

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


More information about the wp-trac mailing list