delete_site_option
Action HookDescription
Fires after a network option has been deleted.Hook Information
File Location |
wp-includes/option.php
View on GitHub
|
Hook Type | Action |
Line Number | 2344 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$option
|
Name of the network option. |
int
|
$network_id
|
ID of the network. |
Usage Examples
Basic Usage
<?php
// Hook into delete_site_option
add_action('delete_site_option', 'my_custom_function', 10, 2);
function my_custom_function($option, $network_id) {
// Your custom code here
}
Source Code Context
wp-includes/option.php:2344
- How this hook is used in WordPress core
<?php
2339 * @since 4.7.0 The `$network_id` parameter was added.
2340 *
2341 * @param string $option Name of the network option.
2342 * @param int $network_id ID of the network.
2343 */
2344 do_action( 'delete_site_option', $option, $network_id );
2345
2346 return true;
2347 }
2348
2349 return false;
PHP Documentation
<?php
/**
* Fires after a network option has been deleted.
*
* @since 3.0.0
* @since 4.7.0 The `$network_id` parameter was added.
*
* @param string $option Name of the network option.
* @param int $network_id ID of the network.
*/
Quick Info
- Hook Type: Action
- Parameters: 2
- File: wp-includes/option.php
Related Hooks
Related hooks will be displayed here in future updates.