From c5595574d73fd818996aa2a3f53868c6a1e7f30d Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Fri, 5 May 2017 18:48:09 +0000 Subject: [PATCH] REST API: Improve strings added after 4.7 string freeze. Clarify the `rest_orderby_include_missing_include` error message. Props PranaliPatel. Fixes #39178. git-svn-id: https://develop.svn.wordpress.org/trunk@40571 602fd350-edb4-49c9-b593-d223f7449a82 --- .../rest-api/endpoints/class-wp-rest-posts-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index 89b4ccb3e2..a0d395e429 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -160,7 +160,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { // Ensure an include parameter is set in case the orderby is set to 'include'. if ( ! empty( $request['orderby'] ) && 'include' === $request['orderby'] && empty( $request['include'] ) ) { - return new WP_Error( 'rest_orderby_include_missing_include', sprintf( __( 'Missing parameter(s): %s' ), 'include' ), array( 'status' => 400 ) ); + return new WP_Error( 'rest_orderby_include_missing_include', __( 'You need to define an include parameter to order by include.' ), array( 'status' => 400 ) ); } // Retrieve the list of registered collection query parameters.