From efb07c689e0df8995eb697a65c29a5e34bba1875 Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 25 Jun 2012 19:32:34 +0000 Subject: [PATCH] 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 --- wp-admin/includes/plugin.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 89ebdea83d..083b5c429d 100644 --- a/wp-admin/includes/plugin.php +++ b/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() ); }