[wp-trac] [WordPress Trac] #10839: Active plugins filtering for site wide plugin support
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 24 03:58:07 UTC 2009
#10839: Active plugins filtering for site wide plugin support
-------------------------+--------------------------------------------------
Reporter: apeatling | Owner: westi
Type: enhancement | Status: new
Priority: normal | Milestone: 2.9
Component: Plugins | Version:
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
This ticket contains the core changes needed for more robust support for
site wide level plugin activation in WordPress MU.
The ticket this relates to is here:
http://trac.mu.wordpress.org/ticket/1101
By filtering the active_plugins array, we can inject site wide activated
plugins into all blogs at include time. This will also allow for site wide
plugins to correctly run though activate_ and deactivate_ hooks. This is
important to allow the plugin manager to correctly handle site wide
plugins on first install or upgrade.
There needs to be a change to the deactivate_plugins() function to
accommodate for the fact that site wide plugins will not exist in the
$current plugins array.
array_search() will return a value that is interpreted by array_splice()
as 0 (zero) when a plugin is not found. This will then perform an
incorrect splice on the $current array and cause many problems. By
performing an identical check on the array_search() result we can ensure
that this doesn't happen.
Patch attached for review and testing.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10839>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list