Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#20230 closed enhancement (duplicate)

Add new filter post_gallery_results to replace the core gallery template after the attachment query

Reported by: jeremyfelt's profile jeremyfelt Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch
Focuses: Cc:


The post_gallery filter in gallery_shortcode() already allows complete replacement of the gallery template provided by core. However, any function attached to this filter must also handle the query logic for attachment data.

The proposed filter post_gallery_results is placed immediately after all query logic is complete. The gallery template output can still be replaced, but with the help of the $attachments data provided by core queries.

Attachments (1)

20230.diff (514 bytes) - added by jeremyfelt 12 years ago.
Additional filter for post_gallery_results in media.php

Download all attachments as: .zip

Change History (4)

12 years ago

Additional filter for post_gallery_results in media.php

#1 @TomAuger
12 years ago

Looks like an exact duplicate of #14130, except that he's putting the filter after the feed() check, instead of before.

However, I prefer #14130 because it also includes the $attr parameter, which is pretty critical if you're going to be rolling your own HTML output.

#2 @TomAuger
12 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

#3 @ocean90
12 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.