[wp-trac] [WordPress Trac] #20220: add test to see if sunrise === on in ms-settings

WordPress Trac noreply at wordpress.org
Thu Dec 19 14:09:27 UTC 2013


#20220: add test to see if sunrise === on in ms-settings
-------------------------+----------------------
 Reporter:  sboisvert    |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Multisite    |     Version:  3.0
 Severity:  normal       |  Resolution:  wontfix
 Keywords:  has-patch    |
-------------------------+----------------------

Comment (by nacin):

 SUNRISE_LOADED doesn't exist in WordPress core.

 This isn't about plugin compatibility, ultimately. I wish it were, I'd
 have less qualms about breaking this. Rather, this is about someone
 updating to the newest version of WordPress (a version that has possibly
 been running since the MU days) and suddenly finding that their
 sunrise.php file — which, when used, is usually extremely important — is
 no longer being loaded, and their site has crashed. That's the big
 picture. It's also a doomsday scenario, but think about how terrible this
 would be.

 Since SUNRISE is used to detect is_multisite(), if you don't want to
 switch to SUBDOMAIN_INSTALL for that, you could also do this:

 `define( 'SUNRISE', false );`

 And in your sunrise.php file:

 `if ( false === SUNRISE ) return;`

 An alternative option we have is when SUNRISE is defined as false, to
 issue a notice saying "uh, your sunrise is still being loaded, just a
 heads up". But that would ingrain this functionality, unless we linked to
 a Codex page that explained "uh, your sunrise is still being loaded.
 change to `true` if that's what you want. if that's not what you want, add
 `if ( false === SUNRISE ) return;` to the top of sunrise.php, that way we
 can change this in WordPress 4.x".

 This is certainly not ideal. ms-settings.php is due for some sort of
 overhaul eventually. This is certainly something to keep in mind.

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


More information about the wp-trac mailing list