[wp-trac] [WordPress Trac] #21569: Filter gallery styles with access to $attr

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 13 21:18:26 UTC 2012


#21569: Filter gallery styles with access to $attr
-------------------------+-----------------------------
 Reporter:  betzster     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Media        |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 Currently you can replace the entire output, but that's all or nothing —
 if you decide to do that, you also need to parse the attributes array,
 decide on good defaults, etc. You can also filter the styles, but you
 don't have access to the attributes array.

 Use case: In my theme, I'd like to use the number of columns as more of a
 suggestion. I could set min-width to what `$itemwidth` is currently and it
 would be more responsive. If the page shrinks too small, it would only
 load 1 image per line instead of being locked into the right number of
 columns.

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


More information about the wp-trac mailing list