Uses
Uses | Description |
---|---|
wp-includes/class-wp-error.php: WP_Error::get_error_codes() | Retrieve all error codes. |
Retrieve first error code available.
(string|int) Empty string, if no error codes.
File: wp-includes/class-wp-error.php
public function get_error_code() { $codes = $this->get_error_codes(); if ( empty( $codes ) ) { return ''; } return $codes[0]; }
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_code