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

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 28 06:18:27 UTC 2010


#14186: gallery_style filter taking more code than just style
--------------------------+-------------------------------------------------
 Reporter:  wjm           |        Owner:           
     Type:  defect (bug)  |       Status:  closed   
 Priority:  normal        |    Milestone:           
Component:  Media         |      Version:  3.0      
 Severity:  normal        |   Resolution:  duplicate
 Keywords:  has-patch     |  
--------------------------+-------------------------------------------------
Changes (by nacin):

  * status:  new => closed
  * resolution:  => duplicate
  * milestone:  Awaiting Review =>


Old description:

> 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.

New description:

 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.

--

Comment:

 Going to close as a duplicate of #15103 as it has a better patch. Feel
 free to weigh in.

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


More information about the wp-trac mailing list