Make WordPress Core


Ignore:
Timestamp:
10/09/2016 08:07:16 PM (7 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r38649 r38765  
    10041004            }
    10051005            $validity = $setting->validate( $unsanitized_value );
     1006            if ( ! is_wp_error( $validity ) ) {
     1007                /** This filter is documented in wp-includes/class-wp-customize-setting.php */
     1008                $late_validity = apply_filters( "customize_validate_{$setting->id}", new WP_Error(), $unsanitized_value, $setting );
     1009                if ( ! empty( $late_validity->errors ) ) {
     1010                    $validity = $late_validity;
     1011                }
     1012            }
    10061013            if ( ! is_wp_error( $validity ) ) {
    10071014                $value = $setting->sanitize( $unsanitized_value );
Note: See TracChangeset for help on using the changeset viewer.