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

Props stevenlinx.
Fixes #50505.
Built from https://develop.svn.wordpress.org/trunk@48212


git-svn-id: http://core.svn.wordpress.org/trunk@47981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-06-29 11:20:08 +00:00
parent 5a60d4b3b0
commit 37dea23ce8
2 changed files with 13 additions and 4 deletions

View File

@ -5898,13 +5898,22 @@ function wp_delete_attachment_files( $post_id, $meta, $backup_sizes, $file ) {
} }
/** /**
* Retrieve attachment meta field for attachment ID. * Retrieves attachment metadata for attachment ID.
* *
* @since 2.1.0 * @since 2.1.0
* *
* @param int $attachment_id Attachment post ID. Defaults to global $post. * @param int $attachment_id Attachment post ID. Defaults to global $post.
* @param bool $unfiltered Optional. If true, filters are not run. Default false. * @param bool $unfiltered Optional. If true, filters are not run. Default false.
* @return mixed Attachment meta field. False on failure. * @return array|false {
* Attachment metadata. False on failure.
*
* @type int $width The width of the attachment.
* @type int $height The height of the attachment.
* @type string $file The file path relative to `wp-content/uploads`.
* @type array $sizes Keys are size slugs, each value is an array containing
* 'file', 'width', 'height', and 'mime-type'.
* @type array $image_meta Image metadata.
* }
*/ */
function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) { function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) {
$attachment_id = (int) $attachment_id; $attachment_id = (int) $attachment_id;
@ -5933,7 +5942,7 @@ function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) {
} }
/** /**
* Update metadata for an attachment. * Updates metadata for an attachment.
* *
* @since 2.1.0 * @since 2.1.0
* *

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.5-alpha-48211'; $wp_version = '5.5-alpha-48212';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.