WordPress at a glance
function is not described

WP_Error::get_error_codes() public WP 2.1.0

Retrieves all error codes.

{} It's a method of the class: WP_Error{}

No Hooks.

Return

Array. List of error codes, if available.

Usage

$WP_Error = new WP_Error();
$WP_Error->get_error_codes();

Changelog

Since 2.1.0 Introduced.

Code of WP_Error::get_error_codes() WP 5.7

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

	return array_keys( $this->errors );
}