REST API: Improve strings added after 4.7 string freeze.
Clarify the `rest_orderby_include_missing_include` error message. Props PranaliPatel. Fixes #39178. Built from https://develop.svn.wordpress.org/trunk@40571 git-svn-id: http://core.svn.wordpress.org/trunk@40441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3dab32af54
commit
428afdaa5a
|
@ -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'.
|
// Ensure an include parameter is set in case the orderby is set to 'include'.
|
||||||
if ( ! empty( $request['orderby'] ) && 'include' === $request['orderby'] && empty( $request['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.
|
// Retrieve the list of registered collection query parameters.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.8-alpha-40570';
|
$wp_version = '4.8-alpha-40571';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue