Changeset 34372 for trunk/src/wp-includes/media.php
- Timestamp:
- 09/22/2015 04:12:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r34362 r34372 792 792 793 793 return $html; 794 } 795 796 /** 797 * Get the URL of an image attachment. 798 * 799 * @since 4.4.0 800 * 801 * @param int $attachment_id Image attachment ID. 802 * @param string|array $size Optional. Registered image size to retrieve the source for or a flat 803 * array of height and width dimensions. Default 'thumbnail'. 804 * @param bool $icon Optional. Whether the image should be treated as an icon. Default false. 805 * @return string|false Attachment URL or false if no image is available. 806 */ 807 function wp_get_attachment_image_url( $attachment_id, $size = 'thumbnail', $icon = false ) { 808 $image = wp_get_attachment_image_src( $attachment_id, $size, $icon ); 809 return isset( $image['0'] ) ? $image['0'] : false; 794 810 } 795 811
Note: See TracChangeset
for help on using the changeset viewer.