Make WordPress Core


Ignore:
Timestamp:
11/16/2016 12:17:31 PM (9 years ago)
Author:
SergeyBiryukov
Message:

REST API: Uppercase 'ID' in endpoint descriptions and error messages for consistency with other strings.

See #38791.

File:
1 edited

Legend:

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

    r39257 r39264  
    142142        $parent = get_post( $request['parent'] );
    143143        if ( ! $request['parent'] || ! $parent || $this->parent_post_type !== $parent->post_type ) {
    144             return new WP_Error( 'rest_post_invalid_parent', __( 'Invalid post parent id.' ), array( 'status' => 404 ) );
     144            return new WP_Error( 'rest_post_invalid_parent', __( 'Invalid post parent ID.' ), array( 'status' => 404 ) );
    145145        }
    146146
     
    180180        $parent = get_post( $request['parent'] );
    181181        if ( ! $request['parent'] || ! $parent || $this->parent_post_type !== $parent->post_type ) {
    182             return new WP_Error( 'rest_post_invalid_parent', __( 'Invalid post parent id.' ), array( 'status' => 404 ) );
     182            return new WP_Error( 'rest_post_invalid_parent', __( 'Invalid post parent ID.' ), array( 'status' => 404 ) );
    183183        }
    184184
    185185        $revision = get_post( $request['id'] );
    186186        if ( ! $revision || 'revision' !== $revision->post_type ) {
    187             return new WP_Error( 'rest_post_invalid_id', __( 'Invalid revision id.' ), array( 'status' => 404 ) );
     187            return new WP_Error( 'rest_post_invalid_id', __( 'Invalid revision ID.' ), array( 'status' => 404 ) );
    188188        }
    189189
     
    210210        $post = get_post( $request['id'] );
    211211        if ( ! $post ) {
    212             return new WP_Error( 'rest_post_invalid_id', __( 'Invalid revision id.' ), array( 'status' => 404 ) );
     212            return new WP_Error( 'rest_post_invalid_id', __( 'Invalid revision ID.' ), array( 'status' => 404 ) );
    213213        }
    214214        $post_type = get_post_type_object( 'revision' );
     
    400400            'properties' => array(
    401401                'author'          => array(
    402                     'description' => __( 'The id for the author of the object.' ),
     402                    'description' => __( 'The ID for the author of the object.' ),
    403403                    'type'        => 'integer',
    404404                    'context'     => array( 'view', 'edit', 'embed' ),
     
    439439                ),
    440440                'parent'          => array(
    441                     'description' => __( 'The id for the parent of the object.' ),
     441                    'description' => __( 'The ID for the parent of the object.' ),
    442442                    'type'        => 'integer',
    443443                    'context'     => array( 'view', 'edit', 'embed' ),
Note: See TracChangeset for help on using the changeset viewer.