WP_Error::get_error_codes() WordPress Method
The WP_Error::get_error_codes() method returns an array of all the error codes that have been set on the WP_Error object.
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 ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |