A WordPress-centric search engine for devs and theme authors

rest_pre_update_setting ›

apply_filters( 'rest_pre_update_setting', false, $name, $request[ $name ], $args )
Parameters: (4)
  • (bool) $result Whether to override the default behavior for updating the value of a setting.
    Required: Yes
  • (string) $name Setting name (as shown in REST API responses).
    Required: Yes
  • (mixed) $value Updated setting value.
    Required: Yes
  • (array) $args Arguments passed to register_setting() for this setting.
    Required: Yes
Defined at:

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.


$updated = apply_filters( 'rest_pre_update_setting', false, $name, $request[ $name ], $args );