mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Customize: Ensure customize_validate_{$setting->id}
filters apply on input post values for WP_Customize_Setting
subclasses that neglect to apply the filter themselves.
Fixes #37638. Built from https://develop.svn.wordpress.org/trunk@38765 git-svn-id: http://core.svn.wordpress.org/trunk@38708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ffb703c002
commit
28795e8dc2
@ -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 ) ) {
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user