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
This commit is contained in:
parent
11671ad73b
commit
047c2fdadd
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue