From a048646021197a5e2d315ceca81b6d93ad61737d Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 26 Aug 2016 09:57:47 +0000 Subject: [PATCH] Load: move `is_wp_error()` to `load.php` so that `WP_Error` is in a file by itself. See #37827. git-svn-id: https://develop.svn.wordpress.org/trunk@38363 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-error.php | 14 -------------- src/wp-includes/load.php | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/wp-includes/class-wp-error.php b/src/wp-includes/class-wp-error.php index 1010adb047..22273f89b2 100644 --- a/src/wp-includes/class-wp-error.php +++ b/src/wp-includes/class-wp-error.php @@ -202,17 +202,3 @@ 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 ); -} diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 403d460641..f6ae4b4c9f 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -1045,3 +1045,17 @@ function wp_doing_ajax() { */ return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX ); } + +/** + * 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 ); +}