WordPress at a glance
filter is not described

customize_validate_(id) filter-hook . WP 4.6.0

Validates a Customize setting value.

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.


add_filter( 'customize_validate_(id)', 'filter_function_name_855', 10, 3 );
function filter_function_name_855( $validity, $value, $this ){
	// filter...

	return $validity;
Filtered from true to WP_Error when invalid.
Value of the setting.
WP_Customize_Setting instance.

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

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

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

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

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

wp-includes/class-wp-customize-setting.php 199
add_filter( "customize_validate_{$this->id}", $this->validate_callback, 10, 3 );