On this page
apply_filters( "pre_update_option_{$option}", mixed $value, mixed $old_value, string $option )
Filters a specific option before its value is (maybe) serialized and updated.
Description
The dynamic portion of the hook name, $option, refers to the option name.
Parameters
$valuemixed-
The new, unserialized option value.
$old_valuemixed-
The old option value.
$optionstring-
Option name.
More Information
This filter is applied to the option value before being saved to the database; this allows the overriding value to be stored. To use this filter, you will need to add filters for specific options names, such as “pre_update_option_foo” to filter the option “foo“.
Source
File: wp-includes/option.php. View all references
$value = apply_filters( "pre_update_option_{$option}", $value, $old_value, $option );
Related
Used By
| Used By | Description |
|---|---|
| update_option() wp-includes/option.php | Updates the value of an option that was already added. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_update_option_option