Make WordPress Core

Opened 8 years ago

Last modified 7 years ago

#38228 new enhancement

Add filter to default gallery shortcode output

Reported by: tristangemus's profile tristangemus Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7
Component: Gallery Keywords: has-patch needs-testing dev-feedback
Focuses: Cc:

Description

Right now the only way to alter the default gallery shortcode output is to use the "post_gallery" shortcode which effectively requires the developer to rewrite the entire shortcode.

There is a lot of redundancy in here since in most cases, we do not want to alter the retrieval of gallery items.

By adding a simple filter at the end of the gallery, we can save a lot of code as well as not effect anyone currently using the post_gallery filter. See my proposed patch.

Attachments (3)

patch_38228.diff (363 bytes) - added by tristangemus 8 years ago.
patch_38228.2.diff (1.1 KB) - added by tristangemus 8 years ago.
patch_38228.3.diff (931 bytes) - added by tristangemus 8 years ago.
Updated description.

Download all attachments as: .zip

Change History (8)

#1 @ramiy
8 years ago

@tristangemus add phpDocs to the filter.

#2 @tristangemus
8 years ago

PHPDocs added, @since field may need to change depending on release.

@tristangemus
8 years ago

Updated description.

#3 @tristangemus
8 years ago

  • Keywords has-patch needs-testing dev-feedback added

This ticket was mentioned in Slack in #core-media by mike. View the logs.


7 years ago

#5 @desrosj
7 years ago

  • Focuses rtl removed
Note: See TracTickets for help on using tickets.