[wpmu-trac] [WordPress MU Trac] #1101: Multiple issues with sitewide plugins

WordPress MU Trac wpmu-trac at lists.automattic.com
Fri Sep 18 04:12:30 UTC 2009


#1101: Multiple issues with sitewide plugins
-------------------------+--------------------------------------------------
 Reporter:  markjaquith  |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  highest      |   Milestone:          
Component:  General      |     Version:          
 Severity:  critical     |    Keywords:          
-------------------------+--------------------------------------------------

Comment(by apeatling):

 I've completed a patch that dramatic simplifies site wide plugin support.

 Using the method in this patch, the site option 'active_sitewide_plugins'
 contains an array of all plugins activated sitewide. At runtime this is
 merged with the blog's 'active_plugins' option, thus activating/including
 both blog plugins and sitewide plugins for every blog.

 Doing it this way removes the differences between wpmu_sitewide_plugins
 and active_sitewide_plugins that was plain confusing and in the end not
 needed. It also allows sitewide plugins to run through the activation and
 deactivation functions properly, firing all the necessary hooks.

 There needs to be a couple of minor core WordPress changes for this to
 work. The first is adding a filter 'active_plugins' to the fetching of the
 active plugins for the blog in wp-settings.php. The second is a minor
 modification to deactivate_plugins() that will explicitly check that the
 plugin exists in the $current array of plugins before any sort of
 array_splice() is carried out (which I think is an improvement
 regardless).

 @markjaquith: could you take a look at these core WP modifications and
 give your feedback? Thanks.

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/1101#comment:2>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list