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.


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


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 WP 5.2.1

function is_wp_error( $thing ) {
	return ( $thing instanceof WP_Error );

Related Functions

From category: Uncategorized

No comments
    Hello, !     Log In . Register