On this page
WP_Error::has_errors(): bool
Verifies if the instance contains errors.
Return
bool If the instance contains errors.
Source
File: wp-includes/class-wp-error.php. View all references
public function has_errors() {
if ( ! empty( $this->errors ) ) {
return true;
}
return false;
}
Related
Used By
| Used By | Description |
|---|---|
| login_header() wp-login.php | Output the login page header. |
| WP_Error::get_error_codes() wp-includes/class-wp-error.php | Retrieves all error codes. |
Changelog
| Version | Description |
|---|---|
| 5.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_error/has_errors