WP_Error::get_error_code(): string|int

Retrieves the first error code available.


Return

string|int Empty string, if no error codes.


Top ↑

Source

File: wp-includes/class-wp-error.php. View all references

public function get_error_code() {
	$codes = $this->get_error_codes();

	if ( empty( $codes ) ) {
		return '';
	}

	return $codes[0];
}


Top ↑

Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.