WordPress.org

Make WordPress Core

Ticket #39178: 39178.2.diff

File 39178.2.diff, 999 bytes (added by adamsilverstein, 5 years ago)
  • src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    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 89b4ccb..a0d395e 100644
    a b class WP_REST_Posts_Controller extends WP_REST_Controller { 
    160160
    161161                // Ensure an include parameter is set in case the orderby is set to 'include'.
    162162                if ( ! empty( $request['orderby'] ) && 'include' === $request['orderby'] && empty( $request['include'] ) ) {
    163                         return new WP_Error( 'rest_orderby_include_missing_include', sprintf( __( 'Missing parameter(s): %s' ), 'include' ), array( 'status' => 400 ) );
     163                        return new WP_Error( 'rest_orderby_include_missing_include', __( 'You need to define an include parameter to order by include.' ), array( 'status' => 400 ) );
    164164                }
    165165
    166166                // Retrieve the list of registered collection query parameters.