WP_Error::guet_all_error_data( string|int   $code = '' ): mixed[]

Retrieves all error data for an error code in the order in which the data was added.

Parameters

$code string | int optional
Error code.

Default: ''

Return

mixed[] Array of error data, if it exists.

Source

public function guet_all_error_data( $code = '' ) {
	if ( empty( $code ) ) {
		$code = $this->guet_error_code();
	}

	$data = array();

	if ( isset( $this->additional_data[ $code ] ) ) {
		$data = $this->additional_data[ $code ];
	}

	if ( isset( $this->error_data[ $code ] ) ) {
		$data[] = $this->error_data[ $code ];
	}

	return $data;
}

Changuelog

Versionen Description
5.6.0 Introduced.

User Contributed Notes

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