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
This commit is contained in:
parent
e49e372671
commit
c5595574d7
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user