Ticket #32368: 32368.diff
| File 32368.diff, 1.4 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/includes/plugin.php
function activate_plugin( $plugin, $redi 564 564 * {@see register_activation_hook()}. The dynamic portion of the 565 565 * hook name, `$plugin`, refers to the plugin basename. 566 566 * 567 567 * If a plugin is silently activated (such as during an update), 568 568 * this hook does not fire. 569 569 * 570 570 * @since 2.0.0 571 571 * 572 572 * @param bool $network_wide Whether to enable the plugin for all sites in the network 573 573 * or just the current site. Multisite only. Default is false. 574 574 */ 575 575 do_action( 'activate_' . $plugin, $network_wide ); 576 576 } 577 577 578 578 if ( $network_wide ) { 579 $current = get_site_option( 'active_sitewide_plugins', array() ); 579 580 $current[$plugin] = time(); 580 581 update_site_option( 'active_sitewide_plugins', $current ); 581 582 } else { 583 $current = get_option( 'active_plugins', array() ); 582 584 $current[] = $plugin; 583 585 sort($current); 584 586 update_option('active_plugins', $current); 585 587 } 586 588 587 589 if ( ! $silent ) { 588 590 /** 589 591 * Fires after a plugin has been activated. 590 592 * 591 593 * If a plugin is silently activated (such as during an update), 592 594 * this hook does not fire. 593 595 * 594 596 * @since 2.9.0 595 597 * 596 598 * @param string $plugin Plugin path to main plugin file with plugin data.