From 32c7696700acc740b28d8b91d8711f6a37345ecd Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 30 Oct 2016 18:52:58 +0000 Subject: [PATCH] Docs: Add a slightly less ambiguous list of return types for `rest_ensure_response()`. See #38398. git-svn-id: https://develop.svn.wordpress.org/trunk@39037 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/rest-api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php index 1a7da17480..7a44856aaf 100644 --- a/src/wp-includes/rest-api.php +++ b/src/wp-includes/rest-api.php @@ -443,8 +443,9 @@ function rest_ensure_request( $request ) { * @since 4.4.0 * * @param WP_Error|WP_HTTP_Response|mixed $response Response to check. - * @return mixed WP_Error if response generated an error, WP_HTTP_Response if response - * is a already an instance, otherwise returns a new WP_REST_Response instance. + * @return WP_REST_Response|mixed If response generated an error, WP_Error, if response + * is already an instance, WP_HTTP_Response, otherwise + * returns a new WP_REST_Response instance. */ function rest_ensure_response( $response ) { if ( is_wp_error( $response ) ) {