add_option
Fires before an option is added.
Usage
add_action( 'add_option', 'wp_kama_add_option_action', 10, 2 ); /** * Function for `add_option` action-hook. * * @param string $option Name of the option to add. * @param mixed $value Value of the option. * * @return void */ function wp_kama_add_option_action( $option, $value ){ // action... }
- $option(string)
- Name of the option to add.
- $value(mixed)
- Value of the option.
Changelog
Since 2.9.0 | Introduced. |
Where the hook is called
wp-includes/option.php 1004
do_action( 'add_option', $option, $value );