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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user