delete_option_(option) action-hookWP 3.0.0

Fires after a specific option has been deleted.

The dynamic portion of the hook name, $option, refers to the option name.

Usage

add_action( 'delete_option_(option)', 'wp_kama_delete_option_action' );

/**
 * Function for `delete_option_(option)` action-hook.
 * 
 * @param string $option Name of the deleted option.
 *
 * @return void
 */
function wp_kama_delete_option_action( $option ){

	// action...
}
$option(string)
Name of the deleted option.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

delete_option()
delete_option_(option)
wp-includes/option.php 1112
do_action( "delete_option_{$option}", $option );

Where the hook is used in WordPress

wp-includes/blocks/site-logo.php 186
add_action( "delete_option_theme_mods_$theme", '_delete_site_logo_on_remove_theme_mods' );
wp-includes/blocks/site-logo.php 206
add_action( 'delete_option_site_logo', '_delete_custom_logo_on_remove_site_logo' );