customize_validate_{$this->id} WordPress Filter Hook
The customize_validate_{$this->id} hook is called when the Customizer settings are saved. This hook can be used to validate the settings and to set any error messages.
apply_filters( "customize_validate_{$this->id}", WP_Error $validity , mixed $value , WP_Customize_Setting $setting ) #
Validates a Customize setting value.
Description
Plugins should amend the $validity object via its WP_Error::add() method.
The dynamic portion of the hook name, $this->ID, refers to the setting ID.
Parameters
- $validity
(WP_Error)Filtered from
truetoWP_Errorwhen invalid.- $value
(mixed)Value of the setting.
- $setting
(WP_Customize_Setting)WP_Customize_Setting instance.
Source
Changelog
| Version | Description |
|---|---|
| 4.6.0 | Introduced. |