Fires immediately before a theme deletion attempt.
$stylesheetstringwp-admin/includes/theme.php:82delete_theme() * Fires immediately before a theme deletion attempt. * * @since 5.8.0 * * @param string $stylesheet Stylesheet of the theme to delete. */ do_action( 'delete_theme', $stylesheet ); $theme = wp_get_theme( $stylesheet ); $themes_dir = trailingslashit( $themes_dir ); $theme_dir = trailingslashit( $themes_dir . $stylesheet ); $deleted = $wp_filesystem->delete( $theme_dir, true );Introduced in 5.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.