Do not activate plugins on initial installation in multisite.

Check `is_multisite()` before activating a plugin that has been installed via AJAX. Without this check, the plugin would be automatically activated on the main site of the network.

Props ianmjones.

Fixes #31327.

Built from https://develop.svn.wordpress.org/trunk@31511


git-svn-id: http://core.svn.wordpress.org/trunk@31492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2015-02-22 21:30:25 +00:00
parent 3ef981335d
commit 678982ee7e
2 changed files with 5 additions and 2 deletions

View File

@ -2904,7 +2904,10 @@ function wp_ajax_install_plugin() {
}
$plugin_status = install_plugin_install_status( $api );
if ( ! is_multisite() ) {
activate_plugin( $plugin_status['file'] );
}
wp_send_json_success( $status );
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31510';
$wp_version = '4.2-alpha-31511';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.