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: https://develop.svn.wordpress.org/trunk@21104 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-06-25 19:32:34 +00:00
parent 4638cffcce
commit a660b3818d
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) ) ) {
$network_wide = true;
$current = get_site_option( 'active_sitewide_plugins', array() );
$_GET['networkwide'] = 1; // Back compat for plugins looking for this value.
} else {
$current = get_option( 'active_plugins', array() );
}