From a271ca696bbce0d506e58013dca942e73e9a7bde Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Mon, 10 Mar 2014 21:34:17 +0000 Subject: [PATCH] Fix docs for the `deactivate_$plugin` and `deactivated_plugin` hooks. Props wpsmith for the original patch. Fixes #27189 Built from https://develop.svn.wordpress.org/trunk@27491 git-svn-id: http://core.svn.wordpress.org/trunk@27335 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index c967ecc6c6..f3a605895b 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -657,11 +657,11 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) { if ( ! $silent ) { /** - * Fires for each plugin being deactivated in deactivate_plugins(), after deactivation - * and when the $silent parameter is false. + * Fires before a specific plugin is deactivated. * - * The action concatenates the 'deactivate_' prefix with the plugin's basename - * to create a dynamically-named action. + * The dynamic portion of the hook name, $plugin. refers to the plugin basename. + * + * The hook only first when the $silent parameter is false. * * @since 2.0.0 * @@ -671,14 +671,15 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) { do_action( 'deactivate_' . $plugin, $network_deactivating ); /** - * Fires for each plugin being deactivated in deactivate_plugins(), after deactivation - * and when the $silent parameter is false. + * Fires before a plugin is deactivated. + * + * The hook only fies when the $silent parameter is false. * * @since 2.9.0 * - * @param string $plugin Plugin path to main plugin file with plugin data. + * @param string $plugin Plugin basename. * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network - * or just the current site. Multisite only. Default is false. + * or just the current site. Multisite only. Default false. */ do_action( 'deactivated_plugin', $plugin, $network_deactivating ); }