deleted_theme WordPress Action Hook

The deleted_theme WordPress hook is triggered when a theme is deleted. It allows you to perform an action when a theme is deleted. For example, you could use this hook to delete the theme's options from the database.

do_action( 'deleted_theme', string $stylesheet, bool $deleted ) #

Fires immediately after a theme deletion attempt.


Parameters

$stylesheet

(string)Stylesheet of the theme to delete.

$deleted

(bool)Whether the theme deletion was successful.


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.