deleted_plugin
Fires immediately after a plugin deletion attempt.
Использование
add_action( 'deleted_plugin', 'wp_kama_deleted_plugin_action', 10, 2 );
/**
* Function for `deleted_plugin` action-hook.
*
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
* @param bool $deleted Whether the plugin deletion was successful.
*
* @return void
*/
function wp_kama_deleted_plugin_action( $plugin_file, $deleted ){
// action...
}
- $plugin_file(строка)
- Path to the plugin file relative to the plugins directory.
- $deleted(true|false)
- Whether the plugin deletion was successful.
Список изменений
| С версии 4.4.0 | Введена. |
Где вызывается хук
deleted_plugin
wp-admin/includes/plugin.php 1002
do_action( 'deleted_plugin', $plugin_file, $deleted );