deleted_theme
Fires immediately after a theme deletion attempt.
Usage
add_action( 'deleted_theme', 'wp_kama_deleted_theme_action', 10, 2 ); /** * Function for `deleted_theme` action-hook. * * @param string $stylesheet Stylesheet of the theme to delete. * @param bool $deleted Whether the theme deletion was successful. * * @return void */ function wp_kama_deleted_theme_action( $stylesheet, $deleted ){ // action... }
- $stylesheet(string)
- Stylesheet of the theme to delete.
- $deleted(true|false)
- Whether the theme deletion was successful.
Changelog
Since 5.8.0 | Introduced. |
Where the hook is called
deleted_theme
wp-admin/includes/theme.php 98
do_action( 'deleted_theme', $stylesheet, $deleted );