Permalink
Browse files

Back compat for plugins looking for networkwide=1 during a plugin act…

…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...
1 parent 867060f commit 7508d49161779e13f60567a2529e1c3cc4158a87 nacin committed Jun 26, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 wp-admin/includes/plugin.php
@@ -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() );
}

0 comments on commit 7508d49

Please sign in to comment.