mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
1c0fa5f73a
commit
2ba7f3da75
@ -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);
|
||||||
|
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user