WordPress at a glance
filter is not described

customize_sanitize_js_(id) filter-hook . WP 3.4.0

Filters a Customize setting value for use in JavaScript.

The dynamic portion of the hook name, $this->id, refers to the setting ID.


add_filter( 'customize_sanitize_js_(id)', 'filter_function_name_617', 10, 2 );
function filter_function_name_617( $value, $this ){
	// filter...

	return $value;
The setting value.
WP_Customize_Setting instance.

Список изменений

С версии 3.4.0 Введена.

Где вызывается хук

wp-includes/class-wp-customize-setting.php 800
$value = apply_filters( "customize_sanitize_js_{$this->id}", $this->value(), $this );

Где используется хук в ядре WP

wp-includes/class-wp-customize-setting.php 205
add_filter( "customize_sanitize_js_{$this->id}", $this->sanitize_js_callback, 10, 2 );