deactivate_plugin хук-событие . WP 2.9.0
Fires before a plugin is deactivated.
If a plugin is silently deactivated (such as during an update), this hook does not fire.
Использование
add_action( 'deactivate_plugin', 'action_function_name_3574', 10, 2 ); function action_function_name_3574( $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 | Введена. |
Где вызывается хук
wp-admin/includes/plugin.php 784
do_action( 'deactivate_plugin', $plugin, $network_deactivating );