Ticket #25229: wp-admin-includes-plugin.diff
File wp-admin-includes-plugin.diff, 4.1 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/plugin.php
540 540 include_once(WP_PLUGIN_DIR . '/' . $plugin); 541 541 542 542 if ( ! $silent ) { 543 /** 544 * Fires before a plugin is activated in activate_plugin() when the $silent parameter is false 545 * 546 * @since 3.0.2 547 * 548 * @param string $plugin Basename of the plugin path to main plugin file with plugin data. 549 * @param bool $network_wide Whether to enable the plugin for all sites in the network or 550 * just the current site. Multisite only. Default is false. 551 */ 543 552 do_action( 'activate_plugin', $plugin, $network_wide ); 553 554 /** 555 * Fires before a plugin is activated in activate_plugin() when the $silent parameter is false 556 * 557 * The action concatenates the 'activate_' prefix with the $plugin value passed to 558 * activate_plugin() to create a dynamically named action. 559 * 560 * @since 3.0.2 561 * 562 * @param bool $network_wide Whether to enable the plugin for all sites in 563 * the network or just the current site. Multisite only. Default is false. 564 */ 544 565 do_action( 'activate_' . $plugin, $network_wide ); 545 566 } 546 567 … … 554 575 } 555 576 556 577 if ( ! $silent ) { 578 /** 579 * Fires after a plugin has been activated in activate_plugin() when the $silent parameter is false 580 * 581 * @since 3.0.2 582 * 583 * @param string $plugin Basename of the plugin path to main plugin file with plugin data. 584 * @param bool $network_wide Whether to enable the plugin for all sites in 585 * the network or just the current site. Multisite only. Default is false. 586 */ 557 587 do_action( 'activated_plugin', $plugin, $network_wide ); 558 588 } 559 589 … … 594 624 $network_deactivating = false !== $network_wide && is_plugin_active_for_network( $plugin ); 595 625 596 626 if ( ! $silent ) 627 /** 628 * Fires for each plugin being deactivated in deactivate_plugins(), before deactivation 629 * and when the $silent parameter is false. 630 * 631 * @since 3.3.2 632 * 633 * @param string $plugin Basename of the plugin path to main plugin file with plugin data. 634 * @param bool $network_deactivating True if the plugin is network-wide and active for the network. 635 */ 597 636 do_action( 'deactivate_plugin', $plugin, $network_deactivating ); 598 637 599 638 if ( false !== $network_wide ) { … … 614 653 } 615 654 616 655 if ( ! $silent ) { 656 /** 657 * Fires for each plugin being deactivated in deactivate_plugins(), after deactivation 658 * and when the $silent parameter is false. 659 * 660 * The action concatenates the 'deactivate_' prefix with the plugin's basename 661 * to create a dynamically named action. 662 * 663 * @since 3.3.2 664 * 665 * @param bool $network_deactivating True if the plugin is network-wide and active for the network. 666 */ 617 667 do_action( 'deactivate_' . $plugin, $network_deactivating ); 668 669 /** 670 * Fires for each plugin being deactivated in deactivate_plugins(), after deactivation 671 * and when the $silent parameter is false. 672 * 673 * @since 3.3.2 674 * 675 * @param string $plugin Basename of the plugin path to main plugin file with plugin data. 676 * @param bool $network_deactivating True if the plugin is network-wide and active for the network. 677 */ 618 678 do_action( 'deactivated_plugin', $plugin, $network_deactivating ); 619 679 } 620 680 } … … 865 925 include WP_PLUGIN_DIR . '/' . $file; 866 926 867 927 add_action( 'uninstall_' . $file, $callable ); 928 929 /** 930 * Fires in uninstall_plugin() once the plugin has been uninstalled. 931 * 932 * The action concatenates the 'uninstall_' prefix with the basename of the 933 * plugin passed to uninstall_plugin() to create a dynamically named action. 934 * 935 * @since 2.6.1 936 * 937 * @param string $plugin Basename of the plugin path to main plugin file with plugin data. 938 * @param bool $network_deactivating True if the plugin is network-wide and active for the network. 939 */ 868 940 do_action( 'uninstall_' . $file ); 869 941 } 870 942 }