delete_theme WordPress Action Hook

The delete_theme WordPress hook is triggered when a theme is deleted. It allows you to run a specific function when a theme is deleted. This hook is useful for cleanup tasks such as deleting options or settings associated with the theme.

do_action( 'delete_theme', string $stylesheet ) #

Fires immediately before a theme deletion attempt.


Parameters

$stylesheet

(string)Stylesheet of the theme to delete.


Top ↑

Source

File: wp-admin/includes/theme.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.