updated_option WordPress Action Hook

The updated_option hook is triggered whenever an option is updated. It takes two arguments: the option name and the new value. This hook is useful for doing things like purging a cache when an option is updated.

do_action( 'updated_option', string $option, mixed $old_value, mixed $value ) #

Fires after the value of an option has been successfully updated.


Parameters

$option

(string)Name of the updated option.

$old_value

(mixed)The old option value.

$value

(mixed)The new option value.


Top ↑

Source

File: wp-includes/option.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.