[wp-trac] [WordPress Trac] #14130: Better gallery shortcode filter

WordPress Trac noreply at wordpress.org
Fri Dec 18 15:45:43 UTC 2015


#14130: Better gallery shortcode filter
-------------------------+----------------------
 Reporter:  johnbillion  |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Shortcodes   |     Version:  3.0
 Severity:  normal       |  Resolution:  wontfix
 Keywords:               |     Focuses:
-------------------------+----------------------
Changes (by aaroncampbell):

 * keywords:  has-patch =>
 * status:  reopened => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 The first approach seemed simple enough; add a filter after the
 attachments are pulled. Having said that, it only skips 29 lines of logic,
 13 of which are setting up attribute defaults.

 The new patch has several issues, but the big one is that it really
 doesn't address the original problem expressed in this ticket. Adding
 container and item classes that can be passed in and filtered doesn't help
 a plugin that needed to rewrite the logic for pulling attachments in order
 to short circuit the gallery logic.

 @HQRaja You don't need to create a whole new shortcode, just use the
 existing `post_gallery` filter. Find that filter in wp-includes/media.php,
 and look at the next 20-30 lines, as you may want to incorporate them into
 your code.

 Due to the lack of interest and the ease of the work around, I'm going to
 go ahead and close this again.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/14130#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list