Changeset 39342 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 11/23/2016 02:42:00 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r39264 r39342 77 77 78 78 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() ) ); 80 80 } 81 81 } … … 379 379 380 380 $schema['properties']['alt_text'] = array( 381 'description' => __( 'Alternative text to display when resourceis not displayed.' ),381 'description' => __( 'Alternative text to display when attachment is not displayed.' ), 382 382 'type' => 'string', 383 383 'context' => array( 'view', 'edit', 'embed' ), … … 388 388 389 389 $schema['properties']['caption'] = array( 390 'description' => __( 'The caption for the resource.' ),390 'description' => __( 'The attachment caption.' ), 391 391 'type' => 'object', 392 392 'context' => array( 'view', 'edit', 'embed' ), … … 396 396 'properties' => array( 397 397 '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.' ), 399 399 'type' => 'string', 400 400 'context' => array( 'edit' ), 401 401 ), 402 402 'rendered' => array( 403 'description' => __( 'HTML caption for the resource, transformed for display.' ),403 'description' => __( 'HTML caption for the attachment, transformed for display.' ), 404 404 'type' => 'string', 405 405 'context' => array( 'view', 'edit', 'embed' ), … … 410 410 411 411 $schema['properties']['description'] = array( 412 'description' => __( 'The description for the resource.' ),412 'description' => __( 'The attachment description.' ), 413 413 'type' => 'object', 414 414 'context' => array( 'view', 'edit' ), … … 432 432 433 433 $schema['properties']['media_type'] = array( 434 'description' => __( ' Type of resource.' ),434 'description' => __( 'Attachment type.' ), 435 435 'type' => 'string', 436 436 'enum' => array( 'image', 'file' ), … … 440 440 441 441 $schema['properties']['mime_type'] = array( 442 'description' => __( ' MIME type of resource.' ),442 'description' => __( 'The attachment MIME type.' ), 443 443 'type' => 'string', 444 444 'context' => array( 'view', 'edit', 'embed' ), … … 447 447 448 448 $schema['properties']['media_details'] = array( 449 'description' => __( 'Details about the resourcefile, specific to its type.' ),449 'description' => __( 'Details about the media file, specific to its type.' ), 450 450 'type' => 'object', 451 451 'context' => array( 'view', 'edit', 'embed' ), … … 454 454 455 455 $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.' ), 457 457 'type' => 'integer', 458 458 'context' => array( 'view', 'edit' ), … … 460 460 461 461 $schema['properties']['source_url'] = array( 462 'description' => __( 'URL to the original resourcefile.' ),462 'description' => __( 'URL to the original attachment file.' ), 463 463 'type' => 'string', 464 464 'format' => 'uri',
Note: See TracChangeset
for help on using the changeset viewer.