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