Make WordPress Core


Ignore:
Timestamp:
05/05/2017 06:48:09 PM (8 years ago)
Author:
adamsilverstein
Message:

REST API: Improve strings added after 4.7 string freeze.

Clarify the rest_orderby_include_missing_include error message.

Props PranaliPatel.
Fixes #39178.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r40324 r40571  
    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
Note: See TracChangeset for help on using the changeset viewer.