Ticket #25229: wp-admin-includes-plugin.2.diff
File wp-admin-includes-plugin.2.diff, 3.7 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 from {@see activate_plugin()} 549 * @param bool $network_wide Argument from {@see activate_plugin()} 550 */ 543 551 do_action( 'activate_plugin', $plugin, $network_wide ); 552 553 /** 554 * Fires before a plugin is activated in activate_plugin() when the $silent parameter is false 555 * 556 * The action concatenates the 'activate_' prefix with the $plugin value passed to 557 * activate_plugin() to create a dynamically named action. 558 * 559 * @since 3.0.2 560 * 561 * @param bool $network_wide Argument from {@see activate_plugin()} 562 */ 544 563 do_action( 'activate_' . $plugin, $network_wide ); 545 564 } 546 565 … … 554 573 } 555 574 556 575 if ( ! $silent ) { 576 /** 577 * Fires after a plugin has been activated in activate_plugin() when the $silent parameter is false 578 * 579 * @since 3.0.2 580 * 581 * @param string $plugin Basename of the plugin path from {@see activate_plugin()} 582 * @param bool $network_wide Argument from {@see activate_plugin()} 583 */ 557 584 do_action( 'activated_plugin', $plugin, $network_wide ); 558 585 } 559 586 … … 594 621 $network_deactivating = false !== $network_wide && is_plugin_active_for_network( $plugin ); 595 622 596 623 if ( ! $silent ) 624 /** 625 * Fires for each plugin being deactivated in deactivate_plugins(), before deactivation 626 * and when the $silent parameter is false. 627 * 628 * @since 3.3.2 629 * 630 * @param string $plugin Basename of the plugin path from {@see activate_plugin()} 631 * @param bool $network_deactivating True if $network_wide passed in {@see deactivate_plugin()} 632 * is true and the plugin is active for the network. 633 */ 597 634 do_action( 'deactivate_plugin', $plugin, $network_deactivating ); 598 635 599 636 if ( false !== $network_wide ) { … … 614 651 } 615 652 616 653 if ( ! $silent ) { 654 /** 655 * Fires for each plugin being deactivated in deactivate_plugins(), after deactivation 656 * and when the $silent parameter is false. 657 * 658 * The action concatenates the 'deactivate_' prefix with the plugin's basename 659 * to create a dynamically named action. 660 * 661 * @since 3.3.2 662 * 663 * @param bool $network_deactivating True if $network_wide passed in {@see deactivate_plugin()} 664 * is true and the plugin is active for the network. 665 */ 617 666 do_action( 'deactivate_' . $plugin, $network_deactivating ); 667 668 /** 669 * Fires for each plugin being deactivated in deactivate_plugins(), after deactivation 670 * and when the $silent parameter is false. 671 * 672 * @since 3.3.2 673 * 674 * @param string $plugin Basename of the plugin path from {@see activate_plugin()} 675 * @param bool $network_deactivating True if $network_wide passed in {@see deactivate_plugin()} 676 * is true and the plugin is 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 {@see uninstall_plugin()} to create a dynamically named action. 934 * 935 * @since 2.6.1 936 */ 868 937 do_action( 'uninstall_' . $file ); 869 938 } 870 939 }