Make WordPress Core

Changeset 31511


Ignore:
Timestamp:
02/22/2015 09:29:45 PM (10 years ago)
Author:
jeremyfelt
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r31429 r31511  
    29052905
    29062906    $plugin_status = install_plugin_install_status( $api );
    2907     activate_plugin( $plugin_status['file'] );
     2907
     2908    if ( ! is_multisite() ) {
     2909        activate_plugin( $plugin_status['file'] );
     2910    }
    29082911
    29092912    wp_send_json_success( $status );
Note: See TracChangeset for help on using the changeset viewer.