WP_Error::get_error_codes(): list<int|string>

In this article

Retrieves all error codes.

Return

list<int|string> List of error codes, if available.

Source

public function get_error_codes() {
	if ( ! $this->has_errors() ) {
		return array();
	}

	return array_keys( $this->errors );
}

Changelog

VersionDescription
2.1.0Introduced.

User Contributed Notes

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