[wp-trac] [WordPress Trac] #18472: The gallery shortcode might need some extra filters.

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 18 12:31:19 UTC 2011


#18472: The gallery shortcode might need some extra filters.
-------------------------+-----------------------------
 Reporter:  kovshenin    |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Gallery      |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 Sorry if this is a duplicated, tried searching didn't find much. Basically
 it's about the gallery shortcode markup. The gallery shortcode itself
 allows you to specify the `itemtag`, `icontag` and the `captiontag` which
 I don't think is the best approach if the end-user decides to switch to a
 new theme at some point, we wouldn't want to get them to rewrite all their
 shortcodes in all their posts, right?

 Anyhow, I'm not asking to remove the mentioned shortcode attributes, but
 rather to filter the defaults. The dd/dt combination might not be the best
 markup in the world and simply changing that to divs and spans or ul/li
 might be a good choice for some theme developers.

 I would love to create a `gallery_shortcode_markup` filter that would run
 through an array of `itemtag`, `icontag` and `captiontag`, that way theme
 (and plugin) developers won't be able to override the order, size,
 columns, and others which would end up making it a little weird and fuzzy
 in the insert gallery UI. Talking about media.php, the `gallery_shortcode`
 function, I can create a patch if you think it would be useful.

 Thanks, and sorry again if this is a duplicate!

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


More information about the wp-trac mailing list