Uses
Uses | Description |
---|---|
wp-includes/class-wp-error.php: WP_Error::has_errors() | Verify if the instance contains errors. |
Retrieve all error codes.
(array) List of error codes, if available.
File: wp-includes/class-wp-error.php
public function get_error_codes() { if ( ! $this->has_errors() ) { return array(); } return array_keys( $this->errors ); }
Version | Description |
---|---|
2.1.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_error/get_error_codes