Back compat for plugins looking for networkwide=1 during a plugin activation hook.

Proper way to detect this: An activation hook callback receives (bool) $network_wide as the first argument.

see #20995 for trunk.



git-svn-id: http://core.svn.wordpress.org/trunk@21104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-06-25 19:32:34 +00:00
parent f6669710e0
commit efb07c689e
1 changed files with 1 additions and 0 deletions

View File

@ -521,6 +521,7 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
if ( is_multisite() && ( $network_wide || is_network_only_plugin($plugin) ) ) { if ( is_multisite() && ( $network_wide || is_network_only_plugin($plugin) ) ) {
$network_wide = true; $network_wide = true;
$current = get_site_option( 'active_sitewide_plugins', array() ); $current = get_site_option( 'active_sitewide_plugins', array() );
$_GET['networkwide'] = 1; // Back compat for plugins looking for this value.
} else { } else {
$current = get_option( 'active_plugins', array() ); $current = get_option( 'active_plugins', array() );
} }