@@ 1839-1840 (lines=2) @@ | ||
1836 | $id = (int) $id; |
|
1837 | $_post = get_post($id); |
|
1838 | ||
1839 | if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) ) |
|
1840 | return __('Missing Attachment'); |
|
1841 | ||
1842 | if ( $permalink ) |
|
1843 | $url = get_attachment_link($_post->ID); |
@@ 1499-1501 (lines=3) @@ | ||
1496 | function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false, $attr = '' ) { |
|
1497 | $_post = get_post( $id ); |
|
1498 | ||
1499 | if ( empty( $_post ) || ( 'attachment' !== $_post->post_type ) || ! $url = wp_get_attachment_url( $_post->ID ) ) { |
|
1500 | return __( 'Missing Attachment' ); |
|
1501 | } |
|
1502 | ||
1503 | if ( $permalink ) { |
|
1504 | $url = get_attachment_link( $_post->ID ); |