Ticket #21569: media.diff
| File media.diff, 1.8 KB (added by , 13 years ago) |
|---|
-
media.php
753 753 $gallery_style = $gallery_div = ''; 754 754 if ( apply_filters( 'use_default_gallery_style', true ) ) 755 755 $gallery_style = " 756 <style type= 'text/css'>756 <style type=\"text/css\"> 757 757 #{$selector} { 758 758 margin: auto; 759 759 } … … 772 772 </style> 773 773 <!-- see gallery_shortcode() in wp-includes/media.php -->"; 774 774 $size_class = sanitize_html_class( $size ); 775 $gallery_div = "<div id= '$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";775 $gallery_div = "<div id=\"$selector\" class=\"gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}\">"; 776 776 $output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div ); 777 777 778 778 $i = 0; 779 779 foreach ( $attachments as $id => $attachment ) { 780 780 $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false); 781 781 782 $output .= "<{$itemtag} class= 'gallery-item'>";782 $output .= "<{$itemtag} class=\"gallery-item\">"; 783 783 $output .= " 784 <{$icontag} class= 'gallery-icon'>784 <{$icontag} class=\"gallery-icon\"> 785 785 $link 786 786 </{$icontag}>"; 787 787 if ( $captiontag && trim($attachment->post_excerpt) ) { 788 788 $output .= " 789 <{$captiontag} class= 'wp-caption-text gallery-caption'>789 <{$captiontag} class=\"wp-caption-text gallery-caption\"> 790 790 " . wptexturize($attachment->post_excerpt) . " 791 791 </{$captiontag}>"; 792 792 } … … 796 796 } 797 797 798 798 $output .= " 799 <br style= 'clear: both;'/>799 <br style=\"clear: both;\" /> 800 800 </div>\n"; 801 801 802 return $output;802 return apply_filters('gallery_output', $output); 803 803 } 804 804 805 805 /**