Description
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.
Occurrences
Filename | Line Number |
---|---|
wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php | 169 |
Parameters
Type | Name | Description |
---|---|---|
bool | $result | Whether to override the default behavior for updating the value of a setting. |
string | $name | Setting name (as shown in REST API responses). |
mixed | $value | Updated setting value. |
array | $args | Arguments passed to register_setting() for this setting. |
PHP Doc
/**
* 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.
*
* @since 4.7.0
*
* @param bool $result Whether to override the default behavior for updating the
* value of a setting.
* @param string $name Setting name (as shown in REST API responses).
* @param mixed $value Updated setting value.
* @param array $args Arguments passed to register_setting() for this setting.
*/