WP_Error::get_error_code()

Retrieve first error code available.


Description Description


Return Return

(string|int) Empty string, if no error codes.


Top ↑

Source 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];
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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