Make WordPress Core

Opened 9 years ago

Closed 6 months ago

Last modified 6 months ago

#38228 closed enhancement (wontfix)

Add filter to default gallery shortcode output

Reported by: tristangemus's profile tristangemus Owned by:
Milestone: 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 9 years ago.
patch_38228.2.diff (1.1 KB) - added by tristangemus 9 years ago.
patch_38228.3.diff (931 bytes) - added by tristangemus 9 years ago.
Updated description.

Download all attachments as: .zip

Change History (10)

#1 @ramiy
9 years ago

@tristangemus add phpDocs to the filter.

#2 @tristangemus
9 years ago

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

@tristangemus
9 years ago

Updated description.

#3 @tristangemus
9 years ago

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

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


8 years ago

#5 @desrosj
8 years ago

  • Focuses rtl removed

#6 @callumbw95
6 months ago

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

Hi all,

I have just taken a look into this and when they were introduced, shortcodes were a pioneering solution that allowed complex content to be embedded in WordPress. However, with the launch of the block editor (Gutenberg), the entire paradigm for content creation has shifted. Blocks are the modern successor to shortcodes, offering a far superior user experience with direct visual manipulation, structured attributes, and easy discoverability through the block inserter.

The core development roadmap is now focused exclusively on the block editor and the ecosystem around it. The Shortcode API is considered feature-complete and is in a maintenance-only state. While critical security issues or major regressions would be addressed, new features or enhancements for the shortcode system are no longer being considered. Any new functionality of this nature should be built as a block.

For these reasons, I am closing this ticket as wontfix. The future of extensible content in WordPress is blocks, and all development efforts are directed there. However, please feel free to reopen this ticket if you wish to discuss this further.

#7 @peterwilsoncc
6 months ago

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