delete_site_option_(option)
Fires after a specific network option has been deleted.
The dynamic portion of the hook name, $option, refers to the option name.
Usage
add_action( 'delete_site_option_(option)', 'wp_kama_delete_site_option_action', 10, 2 ); /** * Function for `delete_site_option_(option)` action-hook. * * @param string $option Name of the network option. * @param int $network_id ID of the network. * * @return void */ function wp_kama_delete_site_option_action( $option, $network_id ){ // action... }
- $option(string)
- Name of the network option.
- $network_id(int)
- ID of the network.
Changelog
Since 3.0.0 | Introduced. |
Since 2.9.0 | As "delete_site_option_{$key}" |
Since 4.7.0 | The $network_id parameter was added. |
Where the hook is called
wp-includes/option.php 2068
do_action( "delete_site_option_{$option}", $option, $network_id );