Skip to content

Commit

Permalink
Back compat for plugins looking for networkwide=1 during a plugin act…
Browse files Browse the repository at this point in the history
…ivation hook.

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

fixes #20995 for 3.4.



git-svn-id: http://core.svn.wordpress.org/branches/3.4@21130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Jun 26, 2012
1 parent 867060f commit 7508d49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wp-admin/includes/plugin.php
Expand Up @@ -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() );
}
Expand Down

0 comments on commit 7508d49

Please sign in to comment.