[wp-trac] Re: [WordPress Trac] #7678: Front Page with 2 galleries doesn't respect settings for each

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 27 23:48:09 GMT 2009


#7678: Front Page with 2 galleries doesn't respect settings for each
------------------------------------+---------------------------------------
 Reporter:  MtDewVirus              |        Type:  defect (bug)
   Status:  new                     |    Priority:  normal      
Milestone:  2.8                     |   Component:  Gallery     
  Version:  2.7                     |    Severity:  normal      
 Keywords:  gallery,css, has-patch  |  
------------------------------------+---------------------------------------

Comment(by jamescollins):

 Replying to [comment:5 DD32]:
 > @jamescollins: Nice idea, And its backwards compatible too!

 Thanks DD32.

 The only problem I can think of would be that if you have the multiple
 galleries for the same page/post id on a single page.

 For example, you have page (id 5) which has a lot of text, with two
 gallery shortcodes on it:


 {{{
 [gallery columns=1]

 text here.

 [gallery columns=4]
 }}}


 In this case, the CSS class for both galleries would be set to
 galleryid-5, so the same problem would still occur (both galleries would
 be displayed with 4 columns)


 The other option could be to use a static counter variable that is
 incremented by one every time the [gallery] shortcode is parsed. This
 guarantees a unique class selector for each gallery on each page.

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


More information about the wp-trac mailing list