WP_Error::get_error_data

Advertisement

Summery Summery

Retrieve error data for error code.

Syntax Syntax

WP_Error::get_error_data( string|int $code = '' )

Parameters Parameters

$code

(string|int) (Optional) Error code.

Default value: ''

Return Return

(mixed) Error data, if it exists.

Source Source

File: wp-includes/class-wp-error.php

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

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

Advertisement

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

What are you looking for?