diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php
index 56755b4060..245b8c326d 100644
--- a/wp-admin/includes/class-wp-upgrader.php
+++ b/wp-admin/includes/class-wp-upgrader.php
@@ -986,6 +986,7 @@ class WP_Upgrader_Skin {
class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
var $plugin = '';
var $plugin_active = false;
+ var $plugin_network_active = false;
function Plugin_Upgrader_Skin($args = array()) {
return $this->__construct($args);
@@ -997,7 +998,8 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
$this->plugin = $args['plugin'];
- $this->plugin_active = is_plugin_active($this->plugin);
+ $this->plugin_active = is_plugin_active( $this->plugin );
+ $this->plugin_network_active = is_plugin_active_for_network( $this->plugin );
parent::__construct($args);
}
@@ -1006,7 +1008,7 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
$this->plugin = $this->upgrader->plugin_info();
if ( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){
show_message(__('Reactivating the plugin…'));
- echo '';
+ echo '';
}
$update_actions = array(
@@ -1390,4 +1392,4 @@ class File_Upload_Upgrader {
$this->package = $uploads['basedir'] . '/' . $this->filename;
}
}
-}
\ No newline at end of file
+}
diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php
index 24ab643e0f..93a8b0a2fd 100644
--- a/wp-admin/plugin-editor.php
+++ b/wp-admin/plugin-editor.php
@@ -55,6 +55,8 @@ case 'update':
fwrite($f, $newcontent);
fclose($f);
+ $network_wide = is_plugin_active_for_network( $file );
+
// Deactivate so we can test it.
if ( is_plugin_active($file) || isset($_POST['phperror']) ) {
if ( is_plugin_active($file) )
@@ -62,7 +64,7 @@ case 'update':
update_option('recently_activated', array($file => time()) + (array)get_option('recently_activated'));
- wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto"));
+ wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto&networkwide=" . $network_wide));
exit;
}
wp_redirect("plugin-editor.php?file=$file&a=te&scrollto=$scrollto");
@@ -83,7 +85,7 @@ default:
wp_die( $error );
if ( ! is_plugin_active($file) )
- activate_plugin($file, "plugin-editor.php?file=$file&phperror=1"); // we'll override this later if the plugin can be included without fatal error
+ activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error
wp_redirect("plugin-editor.php?file=$file&a=te&scrollto=$scrollto");
exit;
diff --git a/wp-admin/update.php b/wp-admin/update.php
index 6592d15995..39175ed149 100644
--- a/wp-admin/update.php
+++ b/wp-admin/update.php
@@ -69,7 +69,7 @@ if ( isset($_GET['action']) ) {
check_admin_referer('activate-plugin_' . $plugin);
if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) {
wp_redirect( 'update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] );
- activate_plugin($plugin);
+ activate_plugin( $plugin, '', ! empty( $_GET['networkwide'] ) );
wp_redirect( 'update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] );
die();
}