WP_Error::get_error_code() WordPress Method
The WP_Error::get_error_code() method is used to get the first error code from a WP_Error object.
WP_Error::get_error_code() #
Retrieves the first error code available.
Return
(string|int) Empty string, if no error codes.
Source
File: wp-includes/class-wp-error.php
public function get_error_code() { $codes = $this->get_error_codes(); if ( empty( $codes ) ) { return ''; } return $codes[0]; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |