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
+2
View File
@@ -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);