deactivated_plugin хук-событиеWP 2.9.0

Fires after a plugin is deactivated.

If a plugin is silently deactivated (such as during an update), this hook does not fire.

Использование

add_action( 'deactivated_plugin', 'wp_kama_deactivated_plugin_action', 10, 2 );

/**
 * Function for `deactivated_plugin` action-hook.
 * 
 * @param string $plugin               Path to the plugin file relative to the plugins directory.
 * @param bool   $network_deactivating Whether the plugin is deactivated for all sites in the network or just the current site. Multisite only.
 *
 * @return void
 */
function wp_kama_deactivated_plugin_action( $plugin, $network_deactivating ){

	// action...
}
$plugin(строка)
Path to the plugin file relative to the plugins directory.
$network_deactivating(true|false)
Whether the plugin is deactivated for all sites in the network or just the current site. Multisite only.
По умолчанию: false

Список изменений

С версии 2.9.0 Введена.

Где вызывается хук

deactivate_plugins()
deactivated_plugin
wp-admin/includes/plugin.php 828
do_action( 'deactivated_plugin', $plugin, $network_deactivating );

Где используется хук в WordPress

Использование не найдено.