WordPress.org

Make WordPress Core

Changeset 48212


Ignore:
Timestamp:
06/29/2020 11:18:37 AM (35 hours ago)
Author:
SergeyBiryukov
Message:

Docs: Document the return value of wp_get_attachment_metadata() using hash notation.

Props stevenlinx.
Fixes #50505.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r48185 r48212  
    58995899
    59005900/**
    5901  * Retrieve attachment meta field for attachment ID.
     5901 * Retrieves attachment metadata for attachment ID.
    59025902 *
    59035903 * @since 2.1.0
     
    59055905 * @param int  $attachment_id Attachment post ID. Defaults to global $post.
    59065906 * @param bool $unfiltered    Optional. If true, filters are not run. Default false.
    5907  * @return mixed Attachment meta field. False on failure.
     5907 * @return array|false {
     5908 *     Attachment metadata. False on failure.
     5909 *
     5910 *     @type int    $width      The width of the attachment.
     5911 *     @type int    $height     The height of the attachment.
     5912 *     @type string $file       The file path relative to `wp-content/uploads`.
     5913 *     @type array  $sizes      Keys are size slugs, each value is an array containing
     5914 *                              'file', 'width', 'height', and 'mime-type'.
     5915 *     @type array  $image_meta Image metadata.
     5916 * }
    59085917 */
    59095918function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) {
     
    59345943
    59355944/**
    5936  * Update metadata for an attachment.
     5945 * Updates metadata for an attachment.
    59375946 *
    59385947 * @since 2.1.0
Note: See TracChangeset for help on using the changeset viewer.