Filters the value of a setting recognized by the REST API.
Allow hijacking the setting value and overriding the built-in behavior by returning a non-null value. The returned value will be presented as the setting value instead.
$resultmixed
$namestring
$argsarray
type string'string', 'boolean', 'integer', 'number', 'array', and 'object'.label stringdescription stringsanitize_callback callableshow_in_rest bool|array'schema' key.default mixedget_option().$response[ $name ] = apply_filters( 'rest_pre_get_setting', null, $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_get_setting