diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index bb892b564e..23e319167e 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -1003,6 +1003,13 @@ final class WP_Customize_Manager { continue; } $validity = $setting->validate( $unsanitized_value ); + if ( ! is_wp_error( $validity ) ) { + /** This filter is documented in wp-includes/class-wp-customize-setting.php */ + $late_validity = apply_filters( "customize_validate_{$setting->id}", new WP_Error(), $unsanitized_value, $setting ); + if ( ! empty( $late_validity->errors ) ) { + $validity = $late_validity; + } + } if ( ! is_wp_error( $validity ) ) { $value = $setting->sanitize( $unsanitized_value ); if ( is_null( $value ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 2e35c2bf2c..3a45604f45 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38764'; +$wp_version = '4.7-alpha-38765'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.