Make WordPress Core


Ignore:
Timestamp:
05/25/2021 01:11:55 PM (5 years ago)
Author:
SergeyBiryukov
Message:

REST API: Update “object” strings to use the appropriate nouns.

This updates route arguments and schema descriptions to use more specific object types for clarity.

Follow-up to [39342].

Props lephleg, jnylen0.
Fixes #40720.

File:
1 edited

Legend:

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

    r49927 r51000  
    7676                                'args'   => array(
    7777                                        'parent' => array(
    78                                                 'description' => __( 'The ID for the parent of the object.' ),
     78                                                'description' => __( 'The ID for the parent of the revision.' ),
    7979                                                'type'        => 'integer',
    8080                                        ),
     
    9696                                'args'   => array(
    9797                                        'parent' => array(
    98                                                 'description' => __( 'The ID for the parent of the object.' ),
     98                                                'description' => __( 'The ID for the parent of the revision.' ),
    9999                                                'type'        => 'integer',
    100100                                        ),
    101101                                        'id'     => array(
    102                                                 'description' => __( 'Unique identifier for the object.' ),
     102                                                'description' => __( 'Unique identifier for the revision.' ),
    103103                                                'type'        => 'integer',
    104104                                        ),
     
    676676                        'properties' => array(
    677677                                'author'       => array(
    678                                         'description' => __( 'The ID for the author of the object.' ),
     678                                        'description' => __( 'The ID for the author of the revision.' ),
    679679                                        'type'        => 'integer',
    680680                                        'context'     => array( 'view', 'edit', 'embed' ),
    681681                                ),
    682682                                'date'         => array(
    683                                         'description' => __( "The date the object was published, in the site's timezone." ),
     683                                        'description' => __( "The date the revision was published, in the site's timezone." ),
    684684                                        'type'        => 'string',
    685685                                        'format'      => 'date-time',
     
    687687                                ),
    688688                                'date_gmt'     => array(
    689                                         'description' => __( 'The date the object was published, as GMT.' ),
     689                                        'description' => __( 'The date the revision was published, as GMT.' ),
    690690                                        'type'        => 'string',
    691691                                        'format'      => 'date-time',
     
    693693                                ),
    694694                                'guid'         => array(
    695                                         'description' => __( 'GUID for the object, as it exists in the database.' ),
     695                                        'description' => __( 'GUID for the revision, as it exists in the database.' ),
    696696                                        'type'        => 'string',
    697697                                        'context'     => array( 'view', 'edit' ),
    698698                                ),
    699699                                'id'           => array(
    700                                         'description' => __( 'Unique identifier for the object.' ),
     700                                        'description' => __( 'Unique identifier for the revision.' ),
    701701                                        'type'        => 'integer',
    702702                                        'context'     => array( 'view', 'edit', 'embed' ),
    703703                                ),
    704704                                'modified'     => array(
    705                                         'description' => __( "The date the object was last modified, in the site's timezone." ),
     705                                        'description' => __( "The date the revision was last modified, in the site's timezone." ),
    706706                                        'type'        => 'string',
    707707                                        'format'      => 'date-time',
     
    709709                                ),
    710710                                'modified_gmt' => array(
    711                                         'description' => __( 'The date the object was last modified, as GMT.' ),
     711                                        'description' => __( 'The date the revision was last modified, as GMT.' ),
    712712                                        'type'        => 'string',
    713713                                        'format'      => 'date-time',
     
    715715                                ),
    716716                                'parent'       => array(
    717                                         'description' => __( 'The ID for the parent of the object.' ),
     717                                        'description' => __( 'The ID for the parent of the revision.' ),
    718718                                        'type'        => 'integer',
    719719                                        'context'     => array( 'view', 'edit', 'embed' ),
    720720                                ),
    721721                                'slug'         => array(
    722                                         'description' => __( 'An alphanumeric identifier for the object unique to its type.' ),
     722                                        'description' => __( 'An alphanumeric identifier for the revision unique to its type.' ),
    723723                                        'type'        => 'string',
    724724                                        'context'     => array( 'view', 'edit', 'embed' ),
Note: See TracChangeset for help on using the changeset viewer.