A WordPress-centric search engine for devs and theme authors



rest_pre_update_setting ›

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.

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 );