Changeset 33669
- Timestamp:
- 08/20/2015 08:31:34 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-template.php
r32892 r33669 1556 1556 * 1557 1557 * @since 2.5.0 1558 * @since 4.4.0 The `$id` parameter can now accept either a post ID or `WP_Post` object. 1558 1559 * 1559 1560 * @param int|WP_Post $id Optional. Post ID or post object. … … 1566 1567 */ 1567 1568 function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false, $attr = '' ) { 1568 $id = intval( $id );1569 1569 $_post = get_post( $id ); 1570 1570 … … 1578 1578 $link_text = $text; 1579 1579 } elseif ( $size && 'none' != $size ) { 1580 $link_text = wp_get_attachment_image( $ id, $size, $icon, $attr );1580 $link_text = wp_get_attachment_image( $_post->ID, $size, $icon, $attr ); 1581 1581 } else { 1582 1582 $link_text = '';
Note: See TracChangeset
for help on using the changeset viewer.