Make WordPress Core


Ignore:
Timestamp:
02/27/2018 02:30:46 AM (7 years ago)
Author:
SergeyBiryukov
Message:

General: Introduce WP_Error::has_errors() method and use it where appropriate.

Props robdxw, DrewAPicture, SergeyBiryukov.
Fixes #42742.

File:
1 edited

Legend:

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

    r42719 r42761  
    23032303                /** This filter is documented in wp-includes/class-wp-customize-setting.php */
    23042304                $late_validity = apply_filters( "customize_validate_{$setting->id}", new WP_Error(), $unsanitized_value, $setting );
    2305                 if ( ! empty( $late_validity->errors ) ) {
     2305                if ( $late_validity->has_errors() ) {
    23062306                    $validity = $late_validity;
    23072307                }
Note: See TracChangeset for help on using the changeset viewer.