Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 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:

Description

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 13 years ago.
Additional filter for post_gallery_results in media.php

Download all attachments as: .zip

Change History (4)

@jeremyfelt
13 years ago

Additional filter for post_gallery_results in media.php

#1 @TomAuger
13 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
13 years ago

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

#3 @ocean90
13 years ago

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