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
This commit is contained in:
Dion Hulse 2015-05-14 06:58:27 +00:00
parent 1c0fa5f73a
commit 2ba7f3da75
2 changed files with 3 additions and 1 deletions

View File

@ -576,9 +576,11 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
} }
if ( $network_wide ) { if ( $network_wide ) {
$current = get_site_option( 'active_sitewide_plugins', array() );
$current[$plugin] = time(); $current[$plugin] = time();
update_site_option( 'active_sitewide_plugins', $current ); update_site_option( 'active_sitewide_plugins', $current );
} else { } else {
$current = get_option( 'active_plugins', array() );
$current[] = $plugin; $current[] = $plugin;
sort($current); sort($current);
update_option('active_plugins', $current); update_option('active_plugins', $current);

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.