Make WordPress Core

Changeset 29818

Timestamp:
10/02/2014 03:55:51 PM (10 years ago)
Author:
wonderboymusic
Message:

In activate_plugin(), do not re-run the activation routine for already-active network-wide plugins.

Adds unit test.

Props jbrinley.
Fixes #28651.

Location:
trunk
Files:
2 edited

Legend:

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

    r29789 r29818  
    534534        return $valid;
    535535
    536     if ( !in_array($plugin, $current) ) {
     536    if ( ) ) {
    537537        if ( !empty($redirect) )
    538538            wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); // we'll override this later if the plugin can be included without fatal error
  • trunk/tests/phpunit/tests/ms.php

    r29747 r29818  
    302302    }
    303303
     304
     305
     306
     307
     308
     309
     310
     311
     312
     313
     314
     315
     316
     317
     318
     319
     320
     321
     322
     323
     324
     325
     326
    304327    function _helper_deactivate_hook() {
    305328        $this->plugin_hook_count++;
Note: See TracChangeset for help on using the changeset viewer.