Filters whether to preempt a setting value update via the REST API.
Allows hijacking the setting update logic and overriding the built-in behavior by returning true.
$resultbool
$namestring
$valuemixed
$argsarray
type string'string', 'boolean', 'integer', 'number', 'array', and 'object'.label stringdescription stringsanitize_callback callableshow_in_rest bool|array'schema' key.default mixedget_option().$updated = apply_filters( 'rest_pre_update_setting', false, $name, $request[ $name ], $args );
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_pre_update_setting