WordPress.org

Make WordPress Core

Ticket #39178: 39178.diff

File 39178.diff, 926 bytes (added by PranaliPatel, 5 years ago)

Update the error string messages.

  • src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

     
    150150
    151151                // Ensure an include parameter is set in case the orderby is set to 'include'.
    152152                if ( ! empty( $request['orderby'] ) && 'include' === $request['orderby'] && empty( $request['include'] ) ) {
    153                         return new WP_Error( 'rest_orderby_include_missing_include', sprintf( __( 'Missing parameter(s): %s' ), 'include' ), array( 'status' => 400 ) );
     153                        return new WP_Error( 'rest_orderby_include_missing_include', __( 'You need to define a include parameter to order by include.' ), array( 'status' => 400 ) );
    154154                }
    155155
    156156                // Retrieve the list of registered collection query parameters.