updated_option
Fires after the value of an option has been successfully updated.
Usage
add_action( 'updated_option', 'wp_kama_updated_option_action', 10, 3 ); /** * Function for `updated_option` action-hook. * * @param string $option Name of the updated option. * @param mixed $old_value The old option value. * @param mixed $value The new option value. * * @return void */ function wp_kama_updated_option_action( $option, $old_value, $value ){ // action... }
- $option(string)
- Name of the updated option.
- $old_value(mixed)
- The old option value.
- $value(mixed)
- The new option value.
Changelog
Since 2.9.0 | Introduced. |
Where the hook is called
updated_option
wp-includes/option.php 1010
do_action( 'updated_option', $option, $old_value, $value );