mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
General: Introduce WP_Error::has_errors() method and use it where appropriate.
Props robdxw, DrewAPicture, SergeyBiryukov. Fixes #42742. git-svn-id: https://develop.svn.wordpress.org/trunk@42761 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -594,7 +594,7 @@ class WP_Customize_Setting {
|
||||
*/
|
||||
$validity = apply_filters( "customize_validate_{$this->id}", $validity, $value, $this );
|
||||
|
||||
if ( is_wp_error( $validity ) && empty( $validity->errors ) ) {
|
||||
if ( is_wp_error( $validity ) && ! $validity->has_errors() ) {
|
||||
$validity = true;
|
||||
}
|
||||
return $validity;
|
||||
|
||||
Reference in New Issue
Block a user