customize_sanitize_js_{$this->id} WordPress Filter Hook
The customize_sanitize_js_{$this->id} hook allows you to sanitize and validate your own custom data before it is saved to the database. This is useful if you want to ensure that your data is clean and valid before it is stored.
apply_filters( "customize_sanitize_js_{$this->id}", mixed $value , WP_Customize_Setting $setting ) #
Filters a Customize setting value for use in JavaScript.
Description
The dynamic portion of the hook name, $this->id
, refers to the setting ID.
Parameters
- $value
(mixed)The setting value.
- $setting
(WP_Customize_Setting)WP_Customize_Setting instance.
Source
Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |