[wp-trac] [WordPress Trac] #14670: sunrise.php in single site installations

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 18 03:06:05 UTC 2011


#14670: sunrise.php in single site installations
------------------------------------+-----------------------
 Reporter:  nacin                   |       Owner:
     Type:  enhancement             |      Status:  reopened
 Priority:  normal                  |   Milestone:
Component:  General                 |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------

Comment (by mikeschinkel):

 Replying to [comment:6 scribu]:
 > You call using actions hacks?

 Please don't put words in my mouth.  Read on...

 Replying to [comment:4 scribu]:
 > If one must-use plugin depends on another, just use the
 'muplugins_loaded' hook to make sure it's loaded.

 You can't enable the `'all'` filter to process the `'muplugins_loaded'`
 hook from within the `'muplugins_loaded'` hook, nor modify any of the
 `global` variables `$wp_filter`, `$wp_actions`, `$merged_filters`,
 `$wp_current_filter` prior to the `'muplugins_loaded'` hook in that
 manner.

 The `'muplugins_loaded'` hook comes after `wp_not_installed()` and
 `wp_plugin_directory_constants()` are called so you cannot modify `global`
 variables that would affect their behavior.  And the `'muplugins_loaded'`
 hook also comes after each of the must-use plugins are loaded in
 alphabetic order by file name. So if you need to be able to be sure to run
 something before one of the must-use plugins is loaded you cannot.

 Those reasons above I why I called it a hack.

 > I oppose it because I don't see the use for it.

 Maybe I'm missing something.  Is there a reason it makes sense that
 `sunrise.php` should be able to be loaded for multisite but ''not'' for
 single site? I don't mean a use-case that multisite has that single site
 does not, but a reason why single site should be disallowed the use of an
 equivalent `sunrise.php`?

 Also, how harmful an addition would this be in your eyes?  It's not like
 it adds anything visible into the admin console and doesn't do anything
 except for very selected circumstances.  Unless I made a logic error, my
 patch stays completely out of the way unless a `sunrise.php` is in the
 `/wp-content/` directory, and my patch demurs to the existing code to load
 `sunrise.php` if MULTISITE has been defined in `/wp-config.php`.

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


More information about the wp-trac mailing list