Ticket #21569: 21569.diff
File 21569.diff, 1.8 KB (added by , 12 years ago) |
---|
-
wp-includes/media.php
693 693 unset( $attr['orderby'] ); 694 694 } 695 695 696 if ( ! isset( $attr['link'] ) ) 697 $attr['link'] = 'post'; 698 696 699 extract(shortcode_atts(array( 697 700 'order' => 'ASC', 698 701 'orderby' => 'menu_order ID', … … 703 706 'columns' => 3, 704 707 'size' => 'thumbnail', 705 708 'include' => '', 706 'exclude' => '' 709 'exclude' => '', 710 'splitter' => '<br style="clear: both;" />' 707 711 ), $attr)); 708 712 709 713 $id = intval($id); … … 772 776 </style> 773 777 <!-- see gallery_shortcode() in wp-includes/media.php -->"; 774 778 $size_class = sanitize_html_class( $size ); 775 $gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class} '>";779 $gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class} gallery-link-{$attr['link']}'>"; 776 780 $output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div ); 777 781 778 782 $i = 0; 779 783 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);784 $link = 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false); 781 785 782 786 $output .= "<{$itemtag} class='gallery-item'>"; 783 787 $output .= " … … 792 796 } 793 797 $output .= "</{$itemtag}>"; 794 798 if ( $columns > 0 && ++$i % $columns == 0 ) 795 $output .= '<br style="clear: both" />';799 $output .= $splitter; 796 800 } 797 801 798 802 $output .= " 799 <br style='clear: both;' />803 " . $splitter . " 800 804 </div>\n"; 801 805 802 806 return $output;