mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
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:
parent
3ef981335d
commit
678982ee7e
@ -2904,7 +2904,10 @@ function wp_ajax_install_plugin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$plugin_status = install_plugin_install_status( $api );
|
$plugin_status = install_plugin_install_status( $api );
|
||||||
activate_plugin( $plugin_status['file'] );
|
|
||||||
|
if ( ! is_multisite() ) {
|
||||||
|
activate_plugin( $plugin_status['file'] );
|
||||||
|
}
|
||||||
|
|
||||||
wp_send_json_success( $status );
|
wp_send_json_success( $status );
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user