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. git-svn-id: https://develop.svn.wordpress.org/trunk@31511 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d854564f73
commit
6556f8e112
@ -2904,7 +2904,10 @@ function wp_ajax_install_plugin() {
|
||||
}
|
||||
|
||||
$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 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user