is_wp_error( mixed $thing )
Checks whether the given variable is a WordPress Error.
Description
Returns whether $thing
is an instance of the WP_Error
class.
Parameters
- $thing
-
(Required) The variable to check.
Return
(bool) Whether the variable is an instance of WP_Error.
Source
File: wp-includes/load.php
function is_wp_error( $thing ) {
return ( $thing instanceof WP_Error );
}
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |