delete_plugin
Fires immediately before a plugin deletion attempt.
Usage
add_action( 'delete_plugin', 'wp_kama_delete_plugin_action' );
/**
* Function for `delete_plugin` action-hook.
*
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
*
* @return void
*/
function wp_kama_delete_plugin_action( $plugin_file ){
// action...
}
- $plugin_file(string)
- Path to the plugin file relative to the plugins directory.
Changelog
| Since 4.4.0 | Introduced. |
Where the hook is called
delete_plugin
wp-admin/includes/plugin.php 980
do_action( 'delete_plugin', $plugin_file );