wpseek.com
A WordPress-centric search engine for devs and theme authors



rest_pre_update_setting › WordPress Filter Hooks

Since4.7.0
Deprecatedn/a
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:
Codex:

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.





Source

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