mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
In activate_plugin(), do not re-run the activation routine for already-active network-wide plugins.
Adds unit test. Props jbrinley. Fixes #28651. git-svn-id: https://develop.svn.wordpress.org/trunk@29818 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -533,7 +533,7 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
|
||||
if ( is_wp_error($valid) )
|
||||
return $valid;
|
||||
|
||||
if ( !in_array($plugin, $current) ) {
|
||||
if ( ( $network_wide && ! isset( $current[ $plugin ] ) ) || ( ! $network_wide && ! in_array( $plugin, $current ) ) ) {
|
||||
if ( !empty($redirect) )
|
||||
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
|
||||
ob_start();
|
||||
|
||||
Reference in New Issue
Block a user