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

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.

Top ↑



(mixed) The old option value.


(mixed) The new option value.


(string) Option name.

Top ↑


File: wp-includes/option.php

View on Trac

Top ↑


Version Description
4.4.0 The $option parameter was added.
2.0.1 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    Contributed by orkans

    It’s worth mentioning that this hook won’t fire if the old option value is exactly the same as the new one, meaning it won’t change anything in DB.

    If you want to fire some additional code on update option event, I suggest using "pre_update_option_{$option}" hook instead.

You must log in before being able to contribute a note or feedback.