1 parent
9737a7c310
commit
358542eef5
1078 files changed
+33799
-65099
No files matched your search
@@ -202,3 +202,17 @@ class WP_Error {
|
||||
unset( $this->error_data[ $code ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether variable is a WordPress Error.
|
||||
*
|
||||
* Returns true if $thing is an object of the WP_Error class.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param mixed $thing Check if unknown variable is a WP_Error object.
|
||||
* @return bool True, if WP_Error. False, if not WP_Error.
|
||||
*/
|
||||
function is_wp_error( $thing ) {
|
||||
return ( $thing instanceof WP_Error );
|
||||
}
|
||||
Reference in new issue
Block a user