[wp-trac] [WordPress Trac] #14186: gallery_style filter taking more code than just style

WordPress Trac wp-trac at lists.automattic.com
Sat Jul 3 18:59:42 UTC 2010


#14186: gallery_style filter taking more code than just style
--------------------------+-------------------------------------------------
 Reporter:  wjm           |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  3.0            
 Severity:  normal        |    Keywords:                 
--------------------------+-------------------------------------------------
 gallery_style hook takes more than just the style tag.

 {{{
         $output = apply_filters('gallery_style', "
                 <style type='text/css'>
                         #{$selector} {
                                 margin: auto;
                         }
                         #{$selector} .gallery-item {
                                 float: {$float};
                                 margin-top: 10px;
                                 text-align: center;
                                 width: {$itemwidth}%;                   }
                         #{$selector} img {
                                 border: 2px solid #cfcfcf;
                         }
                         #{$selector} .gallery-caption {
                                 margin-left: 0;
                         }
                 </style>
                 <!-- see gallery_shortcode() in wp-includes/media.php -->
                 <div id='$selector' class='gallery galleryid-{$id}'>");

 }}}

 patched attached.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14186>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list