diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php
index f11a6fc234..556657cab5 100644
a
|
b
|
function delete_theme( $stylesheet, $redirect = '' ) { |
76 | 76 | $theme_dir = trailingslashit( $themes_dir . $stylesheet ); |
77 | 77 | $deleted = $wp_filesystem->delete( $theme_dir, true ); |
78 | 78 | |
| 79 | /** |
| 80 | * Fires immediately after a theme deletion attempt. |
| 81 | * |
| 82 | * @since 5.6.0 |
| 83 | * |
| 84 | * @param string $stylesheet Stylesheet of the theme to delete. |
| 85 | * @param bool $deleted Whether the theme deletion was successful. |
| 86 | */ |
| 87 | do_action( 'deleted_theme', $stylesheet, $deleted ); |
| 88 | |
79 | 89 | if ( ! $deleted ) { |
80 | 90 | return new WP_Error( |
81 | 91 | 'could_not_remove_theme', |