Changeset 29914 for trunk/src/wp-includes/post-template.php
- Timestamp:
- 10/16/2014 04:27:07 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-template.php
r29429 r29914 1463 1463 * @param bool $icon Optional, default is false. Whether to include icon. 1464 1464 * @param string|bool $text Optional, default is false. If string, then will be link text. 1465 * @param array|string $attr Optional. Array or string of attributes. 1465 1466 * @return string HTML content. 1466 1467 */ 1467 function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false ) {1468 function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false, $attr = '' ) { 1468 1469 $id = intval( $id ); 1469 1470 $_post = get_post( $id ); … … 1475 1476 $url = get_attachment_link( $_post->ID ); 1476 1477 1477 if ( $text ) 1478 if ( $text ) { 1478 1479 $link_text = $text; 1479 elseif ( $size && 'none' != $size )1480 $link_text = wp_get_attachment_image( $id, $size, $icon );1481 else1480 } elseif ( $size && 'none' != $size ) { 1481 $link_text = wp_get_attachment_image( $id, $size, $icon, $attr ); 1482 } else { 1482 1483 $link_text = ''; 1484 } 1483 1485 1484 1486 if ( trim( $link_text ) == '' )
Note: See TracChangeset
for help on using the changeset viewer.