Ticket #7678: 7678_alternative.diff
| File 7678_alternative.diff, 1.2 KB (added by , 17 years ago) |
|---|
-
wp-includes/media.php
610 610 */ 611 611 function gallery_shortcode($attr) { 612 612 global $post; 613 614 static $instance = 0; 615 $instance++; 613 616 614 617 // Allow plugins/themes to override the default gallery template. 615 618 $output = apply_filters('post_gallery', '', $attr); … … 651 654 $captiontag = tag_escape($captiontag); 652 655 $columns = intval($columns); 653 656 $itemwidth = $columns > 0 ? floor(100/$columns) : 100; 657 658 $class = "gallery-{$instance}"; 654 659 655 660 $output = apply_filters('gallery_style', " 656 661 <style type='text/css'> 657 . gallery{662 .{$class} { 658 663 margin: auto; 659 664 } 660 . gallery-item {665 .{$class} .gallery-item { 661 666 float: left; 662 667 margin-top: 10px; 663 668 text-align: center; 664 669 width: {$itemwidth}%; } 665 . galleryimg {670 .{$class} img { 666 671 border: 2px solid #cfcfcf; 667 672 } 668 . gallery-caption {673 .{$class} .gallery-caption { 669 674 margin-left: 0; 670 675 } 671 676 </style> 672 677 <!-- see gallery_shortcode() in wp-includes/media.php --> 673 <div class='gallery '>");678 <div class='gallery $class'>"); 674 679 675 680 $i = 0; 676 681 foreach ( $attachments as $id => $attachment ) {
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)