From 047c2fdadde3e28877035df4f333eea7afe58b67 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 14 May 2015 06:57:47 +0000 Subject: [PATCH] Allow plugins to activate other plugins within their Activation hook. Fixes #32368 git-svn-id: https://develop.svn.wordpress.org/trunk@32504 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/plugin.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index d447ece4b7..fa250beb77 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -576,9 +576,11 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen } if ( $network_wide ) { + $current = get_site_option( 'active_sitewide_plugins', array() ); $current[$plugin] = time(); update_site_option( 'active_sitewide_plugins', $current ); } else { + $current = get_option( 'active_plugins', array() ); $current[] = $plugin; sort($current); update_option('active_plugins', $current);