Make WordPress Core


Ignore:
Timestamp:
11/23/2016 02:42:00 AM (10 years ago)
Author:
joehoyle
Message:

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

Props ramiy.
Fixes #38811.

File:
1 edited

Legend:

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

    r39264 r39342  
    7777
    7878                        if ( ! current_user_can( $post_parent_type->cap->edit_post, $request['post'] ) ) {
    79                                 return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to upload media to this resource.' ), array( 'status' => rest_authorization_required_code() ) );
     79                                return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to upload media to this post.' ), array( 'status' => rest_authorization_required_code() ) );
    8080                        }
    8181                }
    … …  
    379379
    380380                $schema['properties']['alt_text'] = array(
    381                         'description'     => __( 'Alternative text to display when resource is not displayed.' ),
     381                        'description'     => __( 'Alternative text to display when attachment is not displayed.' ),
    382382                        'type'            => 'string',
    383383                        'context'         => array( 'view', 'edit', 'embed' ),
    … …  
    388388
    389389                $schema['properties']['caption'] = array(
    390                         'description' => __( 'The caption for the resource.' ),
     390                        'description' => __( 'The attachment caption.' ),
    391391                        'type'        => 'object',
    392392                        'context'     => array( 'view', 'edit', 'embed' ),
    … …  
    396396                        'properties'  => array(
    397397                                'raw' => array(
    398                                         'description' => __( 'Caption for the resource, as it exists in the database.' ),
     398                                        'description' => __( 'Caption for the attachment, as it exists in the database.' ),
    399399                                        'type'        => 'string',
    400400                                        'context'     => array( 'edit' ),
    401401                                ),
    402402                                'rendered' => array(
    403                                         'description' => __( 'HTML caption for the resource, transformed for display.' ),
     403                                        'description' => __( 'HTML caption for the attachment, transformed for display.' ),
    404404                                        'type'        => 'string',
    405405                                        'context'     => array( 'view', 'edit', 'embed' ),
    … …  
    410410
    411411                $schema['properties']['description'] = array(
    412                         'description' => __( 'The description for the resource.' ),
     412                        'description' => __( 'The attachment description.' ),
    413413                        'type'        => 'object',
    414414                        'context'     => array( 'view', 'edit' ),
    … …  
    432432
    433433                $schema['properties']['media_type'] = array(
    434                         'description'     => __( 'Type of resource.' ),
     434                        'description'     => __( 'Attachment type.' ),
    435435                        'type'            => 'string',
    436436                        'enum'            => array( 'image', 'file' ),
    … …  
    440440
    441441                $schema['properties']['mime_type'] = array(
    442                         'description'     => __( 'MIME type of resource.' ),
     442                        'description'     => __( 'The attachment MIME type.' ),
    443443                        'type'            => 'string',
    444444                        'context'         => array( 'view', 'edit', 'embed' ),
    … …  
    447447
    448448                $schema['properties']['media_details'] = array(
    449                         'description'     => __( 'Details about the resource file, specific to its type.' ),
     449                        'description'     => __( 'Details about the media file, specific to its type.' ),
    450450                        'type'            => 'object',
    451451                        'context'         => array( 'view', 'edit', 'embed' ),
    … …  
    454454
    455455                $schema['properties']['post'] = array(
    456                         'description'     => __( 'The ID for the associated post of the resource.' ),
     456                        'description'     => __( 'The ID for the associated post of the attachment.' ),
    457457                        'type'            => 'integer',
    458458                        'context'         => array( 'view', 'edit' ),
    … …  
    460460
    461461                $schema['properties']['source_url'] = array(
    462                         'description'     => __( 'URL to the original resource file.' ),
     462                        'description'     => __( 'URL to the original attachment file.' ),
    463463                        'type'            => 'string',
    464464                        'format'          => 'uri',
Note: See TracChangeset for help on using the changeset viewer.