update_option_(option) action-hookWP 2.0.1

Fires after the value of a specific option has been successfully updated.

The dynamic portion of the hook name, $option, refers to the option name.

Usage

add_action( 'update_option_(option)', 'wp_kama_update_option_action', 10, 3 );

/**
 * Function for `update_option_(option)` action-hook.
 * 
 * @param mixed  $old_value The old option value.
 * @param mixed  $value     The new option value.
 * @param string $option    Option name.
 *
 * @return void
 */
function wp_kama_update_option_action( $old_value, $value, $option ){

	// action...
}
$old_value(mixed)
The old option value.
$value(mixed)
The new option value.
$option(string)
Option name.

Changelog

Since 2.0.1 Introduced.
Since 4.4.0 The $option parameter was added.

Where the hook is called

update_option()
update_option_(option)
wp-includes/option.php 889
do_action( "update_option_{$option}", $old_value, $value, $option );

Where the hook is used in WordPress

wp-admin/includes/admin-filters.php 71
add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );
wp-admin/includes/admin-filters.php 72
add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
wp-admin/includes/admin-filters.php 73
add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
wp-admin/includes/admin-filters.php 74
add_action( 'update_option_admin_email', 'wp_site_admin_email_change_notification', 10, 3 );
wp-admin/includes/admin-filters.php 77
add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
wp-includes/blocks/site-logo.php 185
add_action( "update_option_theme_mods_$theme", '_delete_site_logo_on_remove_custom_logo', 10, 2 );
wp-includes/default-filters.php 393
add_action( 'update_option_home', 'wp_update_https_migration_required', 10, 2 );
wp-includes/default-filters.php 539
add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' );
wp-includes/default-filters.php 540
add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' );
wp-includes/ms-default-filters.php 124
add_action( 'update_option_blogname', 'clean_site_details_cache', 10, 0 );
wp-includes/ms-default-filters.php 125
add_action( 'update_option_siteurl', 'clean_site_details_cache', 10, 0 );
wp-includes/ms-default-filters.php 126
add_action( 'update_option_post_count', 'clean_site_details_cache', 10, 0 );
wp-includes/ms-default-filters.php 127
add_action( 'update_option_home', 'clean_site_details_cache', 10, 0 );
wp-includes/ms-default-filters.php 19
add_action( 'update_option_blog_public', 'update_blog_public', 10, 2 );
wp-includes/update.php 1168
add_action( 'update_option_WPLANG', 'wp_clean_update_cache', 10, 0 );