customize_validate_(setting_id)
This filter is documented in wp-includes/class-wp-customize-setting.php
Использование
add_filter( 'customize_validate_(setting_id)', 'wp_kama_customize_validate_setting_id_filter', 10, 3 ); /** * Function for `customize_validate_(setting_id)` filter-hook. * * @param $WP_Error * @param $unsanitized_value * @param $setting * * @return */ function wp_kama_customize_validate_setting_id_filter( $WP_Error, $unsanitized_value, $setting ){ // filter... return $WP_Error; }
- $WP_Error
- -
- $unsanitized_value
- -
- $setting
- -
Где вызывается хук
customize_validate_(setting_id)
wp-includes/class-wp-customize-manager.php 2375
$late_validity = apply_filters( "customize_validate_{$setting->id}", new WP_Error(), $unsanitized_value, $setting );
Где используется хук в WordPress
wp-includes/class-wp-customize-setting.php 200
add_filter( "customize_validate_{$this->id}", $this->validate_callback, 10, 3 );