Retrieves the first error code available.
Source
public function get_error_code() {
$codes = $this->get_error_codes();
if ( empty( $codes ) ) {
return '';
}
return $codes[0];
}
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |
CARVIEW |
Retrieves the first error code available.
public function get_error_code() {
$codes = $this->get_error_codes();
if ( empty( $codes ) ) {
return '';
}
return $codes[0];
}
Uses | Description |
---|---|
WP_Error::get_error_codes()wp-includes/class-wp-error.php | Retrieves all error codes. |
Used by | Description |
---|---|
WP_Error::get_all_error_data()wp-includes/class-wp-error.php | Retrieves all error data for an error code in the order in which the data was added. |
Plugin_Installer_Skin::hide_process_failed()wp-admin/includes/class-plugin-installer-skin.php | Hides the |
Theme_Installer_Skin::hide_process_failed()wp-admin/includes/class-theme-installer-skin.php | Hides the |
login_header()wp-login.php | Outputs the login page header. |
WP_Error::get_error_message()wp-includes/class-wp-error.php | Gets a single error message. |
WP_Error::get_error_data()wp-includes/class-wp-error.php | Retrieves the most recently added error data for an error code. |
WP_Error::add_data()wp-includes/class-wp-error.php | Adds data to an error with the given code. |
Version | Description |
---|---|
2.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.