WordPress.org

Make WordPress Core

Ticket #50835: 50835.3.diff

File 50835.3.diff, 3.6 KB (added by Mista-Flo, 5 weeks ago)

Fix since prop order

  • src/wp-includes/media.php

    diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
    index 2403df6a24..3b2ed99866 100644
    a b function wp_plupload_default_settings() { 
    37663766 *
    37673767 * @since 3.5.0
    37683768 *
    3769  * @param int|WP_Post $attachment Attachment ID or object.
    3770  * @return array|void Array of attachment details.
     3769 * @param int|WP_Post $attachment            Attachment ID or object.
     3770 *
     3771 * @return array|void {
     3772 *     Array of attachment details.
     3773 *
     3774 * @type int          $id                    The ID of the attachment
     3775 * @type string       $title                 The attachment's title (Usually the slugified file name without the extension)
     3776 * @type string       $filename              The attachment's file name
     3777 * @type string       $url                   The attachment's direct link (from wp-content)
     3778 * @type string       $link                  The URL to the attachment page
     3779 * @type string       $alt                   Alt text of the attachment
     3780 * @type string       $author                The Author's ID in string format
     3781 * @type string       $description           The attachment's description
     3782 * @type string       $caption               The attachment's caption
     3783 * @type string       $name                  The attachment's name, same as title
     3784 * @type string       $status                Attachment's 'post' status (Usually 'inherit')
     3785 * @type int          $uploadedTo            Parent post to which the attachment was uploaded
     3786 * @type int          $date                  Uploaded date, timestamp in milliseconds
     3787 * @type int          $modified              Last modified, timestamp in milliseconds
     3788 * @type int          $menuOrder             Post's menu order
     3789 * @type string       $mime                  Attachment's mine (Ex: image/jpeg, application/zip, etc.)
     3790 * @type string       $type                  Attachment type (Usually first-part of mime, eg: image)
     3791 * @type string       $subtype               Attachment's subtype (Usually the last-part of mine, eg: jpeg / zip)
     3792 * @type string       $icon                  Attachment's icon URL (Eg: /wp-includes/images/media/archive.png)
     3793 * @type string       $dateFormatted         Formatted Date (Eg: June 29, 2018)
     3794 * @type array        $nonces                Nounces for update, delete and edit
     3795 * @type string       $editLink              Link to attachment's edit page
     3796 * @type array        $meta                  Attachment's meta
     3797 * @type string       $authorName            Author's name
     3798 * @type string       $uploadedToLink        Link to the attachment's parent post edit page
     3799 * @type string       $uploadedToTitle       Attachment's parent post title
     3800 * @type int          $filesizeInBytes       Attachment's filesize in bytes
     3801 * @type string       $filesizeHumanReadable Attachment's filesize in human readable format (Eg: 1 MB)
     3802 * @type string       $context               Context, whether it's used as site icon for example
     3803 * @type array        $compat                Containing item and meta
     3804 * @type int          $height                If the attachment's an image, it represents the height of the image.
     3805 * @type int          $width                 If the attachment's an image, it represents the width of the image.
     3806 * @type string       $orientation           If the attachment's an image, it represents the image orientation (landscape / portrait).
     3807 * @type array        $sizes                 If the attachment's an image, it contains an array of arrays from the different images sizes: thumb, medium, large, full
     3808 * }
     3809 *
    37713810 */
    37723811function wp_prepare_attachment_for_js( $attachment ) {
    37733812        $attachment = get_post( $attachment );