deleted_option
Action HookDescription
Fires after an option has been deleted.Hook Information
File Location |
wp-includes/option.php
View on GitHub
|
Hook Type | Action |
Line Number | 1274 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$option
|
Name of the deleted option. |
Usage Examples
Basic Usage
<?php
// Hook into deleted_option
add_action('deleted_option', 'my_custom_function', 10, 1);
function my_custom_function($option) {
// Your custom code here
}
Source Code Context
wp-includes/option.php:1274
- How this hook is used in WordPress core
<?php
1269 *
1270 * @since 2.9.0
1271 *
1272 * @param string $option Name of the deleted option.
1273 */
1274 do_action( 'deleted_option', $option );
1275
1276 return true;
1277 }
1278
1279 return false;
PHP Documentation
<?php
/**
* Fires after an option has been deleted.
*
* @since 2.9.0
*
* @param string $option Name of the deleted option.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-includes/option.php
Related Hooks
Related hooks will be displayed here in future updates.