Ticket #33905: media.diff
File media.diff, 1.8 KB (added by , 9 years ago) |
---|
-
src/wp-includes/media.php
148 148 * @param int $id Attachment ID for image. 149 149 * @param array|string $size Optional. Image size to scale to. Accepts a registered image size 150 150 * or flat array of height and width values. Default 'medium'. 151 * @return false|array False on failure, array on success.151 * @return false|array False on failure, array (url, width, height, is_intermediate) on success. 152 152 */ 153 153 function image_downsize( $id, $size = 'medium' ) { 154 154 … … 691 691 * 692 692 * A mime icon for files, thumbnail or intermediate size for images. 693 693 * 694 * The returned array contains four values: the URL of the attachment image src, 695 * the width of the image file, the height of the image file, and a boolean 696 * representing whether the returned array describes an intermediate (generated) 697 * image size or the original, full-sized upload. 698 * 694 699 * @since 2.5.0 695 700 * 696 701 * @param int $attachment_id Image attachment ID. … … 697 702 * @param string|array $size Optional. Registered image size to retrieve the source for or a flat 698 703 * array of height and width dimensions. Default 'thumbnail'. 699 704 * @param bool $icon Optional. Whether the image should be treated as an icon. Default false. 700 * @return false|array Returns an array (url, width, height ), or false, if no image is available.705 * @return false|array Returns an array (url, width, height, is_intermediate), or false, if no image is available. 701 706 */ 702 707 function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon = false ) { 703 708 // get a thumbnail or intermediate image if there is one