mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Docs: Document the return value of wp_prepare_attachment_for_js()
using hash notation.
Props stevenlinx, Mista-Flo, johnbillion. Fixes #50835. Built from https://develop.svn.wordpress.org/trunk@49281 git-svn-id: http://core.svn.wordpress.org/trunk@49041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
57ae91be78
commit
0a70f9b004
@ -3767,7 +3767,47 @@ function wp_plupload_default_settings() {
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param int|WP_Post $attachment Attachment ID or object.
|
||||
* @return array|void Array of attachment details.
|
||||
* @return array|void {
|
||||
* Array of attachment details, or void if the parameter does not correspond to an attachment.
|
||||
*
|
||||
* @type string $alt Alt text of the attachment.
|
||||
* @type string $author ID of the attachment author, as a string.
|
||||
* @type string $authorName Name of the attachment author.
|
||||
* @type string $caption Caption for the attachment.
|
||||
* @type array $compat Containing item and meta.
|
||||
* @type string $context Context, whether it's used as the site icon for example.
|
||||
* @type int $date Uploaded date, timestamp in milliseconds.
|
||||
* @type string $dateFormatted Formatted date (e.g. June 29, 2018).
|
||||
* @type string $description Description of the attachment.
|
||||
* @type string $editLink URL to the edit page for the attachment.
|
||||
* @type string $filename File name of the attachment.
|
||||
* @type string $filesizeHumanReadable Filesize of the attachment in human readable format (e.g. 1 MB).
|
||||
* @type int $filesizeInBytes Filesize of the attachment in bytes.
|
||||
* @type int $height If the attachment is an image, represents the height of the image in pixels.
|
||||
* @type string $icon Icon URL of the attachment (e.g. /wp-includes/images/media/archive.png).
|
||||
* @type int $id ID of the attachment.
|
||||
* @type string $link URL to the attachment.
|
||||
* @type int $menuOrder Menu order of the attachment post.
|
||||
* @type array $meta Meta data for the attachment.
|
||||
* @type string $mime Mime type of the attachment (e.g. image/jpeg or application/zip).
|
||||
* @type int $modified Last modified, timestamp in milliseconds.
|
||||
* @type string $name Name, same as title of the attachment.
|
||||
* @type array $nonces Nonces for update, delete and edit.
|
||||
* @type string $orientation If the attachment is an image, represents the image orientation
|
||||
* (landscape or portrait).
|
||||
* @type array $sizes If the attachment is an image, contains an array of arrays
|
||||
* for the images sizes: thumbnail, medium, large, and full.
|
||||
* @type string $status Post status of the attachment (usually 'inherit').
|
||||
* @type string $subtype Mime subtype of the attachment (usually the last part, e.g. jpeg or zip).
|
||||
* @type string $title Title of the attachment (usually slugified file name without the extension).
|
||||
* @type string $type Type of the attachment (usually first part of the mime type, e.g. image).
|
||||
* @type int $uploadedTo Parent post to which the attachment was uploaded.
|
||||
* @type string $uploadedToLink URL to the edit page of the parent post of the attachment.
|
||||
* @type string $uploadedToTitle Post title of the parent of the attachment.
|
||||
* @type string $url Direct URL to the attachment file (from wp-content).
|
||||
* @type int $width If the attachment is an image, represents the width of the image in pixels.
|
||||
* }
|
||||
*
|
||||
*/
|
||||
function wp_prepare_attachment_for_js( $attachment ) {
|
||||
$attachment = get_post( $attachment );
|
||||
@ -3999,7 +4039,7 @@ function wp_prepare_attachment_for_js( $attachment ) {
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param array $response Array of prepared attachment data.
|
||||
* @param array $response Array of prepared attachment data. @see wp_prepare_attachment_for_js().
|
||||
* @param WP_Post $attachment Attachment object.
|
||||
* @param array|false $meta Array of attachment meta data, or false if there is none.
|
||||
*/
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.6-beta1-49280';
|
||||
$wp_version = '5.6-beta1-49281';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user