Add new filter post_gallery_results to replace the core gallery template after the attachment query
|Reported by:||jeremyfelt||Owned by:|
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.