[wpmu-trac] [WordPress MU Trac] #1147: deactivating sitewide plugins
WordPress MU Trac
wpmu-trac at lists.automattic.com
Wed Nov 4 16:36:46 UTC 2009
#1147: deactivating sitewide plugins
------------------------+---------------------------------------------------
Reporter: wpmuguru | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: component1 | Version:
Severity: normal | Keywords:
------------------------+---------------------------------------------------
Comment(by wpmuguru):
The latest from svn - start at line 477 of wp-settings.php. Unless the
sitewide plugin is deleted, it is executed. This fixes it:
`$wpmu_sitewide_plugins = (array) maybe_unserialize( get_site_option(
'wpmu_sitewide_plugins' ) );
$deactivated_sitewide_plugins = (array) maybe_unserialize(
get_site_option( 'deactivated_sitewide_plugins' ) );
foreach( $wpmu_sitewide_plugins as $plugin_file => $activation_time ) {
if ( !$plugin_file )
continue;
if ( !file_exists( WP_PLUGIN_DIR . '/' . $plugin_file ) ) {
$deleted_sitewide_plugins[] = $plugin_file;
} elseif( !in_array($plugin_file, $deactivated_sitewide_plugins) )
{
include_once( WP_PLUGIN_DIR . '/' . $plugin_file );
}
}
`
--
Ticket URL: <http://trac.mu.wordpress.org/ticket/1147#comment:2>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser
More information about the wpmu-trac
mailing list