WP_Error::get_error_codes(): array

In this article

Retrieves all error codes.

Return

array 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.