update_option_{$option} WordPress Action Hook

The update_option_{$option} hook is called when the value of a particular option is updated. This hook can be useful for performing actions when an option's value is changed. For example, you could use this hook to trigger a cache refresh whenever an option that affects the output of your website is updated.

do_action( "update_option_{$option}", mixed $old_value, mixed $value, string $option ) #

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


Description

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


Top ↑

Parameters

$old_value

(mixed)The old option value.

$value

(mixed)The new option value.

$option

(string)Option name.


Top ↑

Source

File: wp-includes/option.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0The $option parameter was added.
2.0.1Introduced.

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.