WordPress at a glance

is_wp_error() WP 1.0

Check whether variable is a WordPress Error.

Returns true if $thing is an object of the WP_Error class.

No Hooks.

Return

true/false. True, if WP_Error. False, if not WP_Error.

Usage

is_wp_error( $thing );
$thing(mixed) (required)
Check if unknown variable is a WP_Error object.

Code of is_wp_error: wp-includes/load.php VER 4.9.8

<?php
function is_wp_error( $thing ) {
	return ( $thing instanceof WP_Error );
}

Related Functions

From category: Uncategorized

No comments
    Hello, !     Log In . Register