From 2ba7f3da75442b1cf97c4f4890bd30d34bedc9c6 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 14 May 2015 06:58:27 +0000 Subject: [PATCH] Allow plugins to activate other plugins within their Activation hook. Fixes #32368 Built from https://develop.svn.wordpress.org/trunk@32504 git-svn-id: http://core.svn.wordpress.org/trunk@32474 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index d447ece4b7..fa250beb77 100644 --- a/wp-admin/includes/plugin.php +++ b/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); diff --git a/wp-includes/version.php b/wp-includes/version.php index 0a312c8c3f..b27029f094 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32503'; +$wp_version = '4.3-alpha-32504'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.