diff --git wp-includes/media.php wp-includes/media.php
index 682ffbb..c87bf70 100644
|
|
|
function gallery_shortcode($attr) { |
| 777 | 777 | |
| 778 | 778 | $i = 0; |
| 779 | 779 | foreach ( $attachments as $id => $attachment ) { |
| 780 | | $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false); |
| | 780 | /* |
| | 781 | * Output image link. By default, image links to |
| | 782 | * attachment page. If link="file" is passed to |
| | 783 | * the shortcode, the image links directly to |
| | 784 | * the file. |
| | 785 | */ |
| | 786 | $image_link = isset( $attr['link'] ) && 'file' == $attr['link'] ? wp_get_attachment_link( $id, $size, false, false ) : wp_get_attachment_link( $id, $size, true, false ); |
| | 787 | /* |
| | 788 | * Output flat image. By default, image links to |
| | 789 | * attachment page. If link="none" is passed to |
| | 790 | * the shortcode, a flat (unlinked) image is |
| | 791 | * output. |
| | 792 | */ |
| | 793 | $flat_image = ( isset( $attr['link'] ) && 'none' == $attr['link'] ? wp_get_attachment_image( $id, $size, false ) : false ); |
| | 794 | // Determine whether to output a linked or flat image |
| | 795 | $image_output = ( $flat_image ? $flat_image : $image_link ); |
| 781 | 796 | |
| 782 | 797 | $output .= "<{$itemtag} class='gallery-item'>"; |
| 783 | 798 | $output .= " |
| 784 | 799 | <{$icontag} class='gallery-icon'> |
| 785 | | $link |
| | 800 | $image_output |
| 786 | 801 | </{$icontag}>"; |
| 787 | 802 | if ( $captiontag && trim($attachment->post_excerpt) ) { |
| 788 | 803 | $output .= " |