Covers the following filters:
post_gallery
The post_gallery
filter fires when a [gallery]
shortcode is rendered. It's a documented way of modifying gallery output.
The Gutenberg Gallery Block does not fire this filter when displaying a gallery.
From WordPress/gutenberg#5972: The WP Gallery Custom Links plugin adds a "Gallery Link URL" field when editing gallery images so users are able to create galleries which link to external resources.
The WP Gallery Custom Links plugin continues to work on the backend with Gutenberg active, but links are ignored on the frontend.
The Slick Slider plugin uses the post_gallery
filter to turn native galleries into sliders:
https://github.com/tyrann0us/slick-slider/blob/761477365a31a2947f65dd19e8ffbc818c0815d9/inc/class-output.php#L39-L47
Because of the missing filter the plugin cannot simply re-use it for websites that use the Block Editor, but the code has to be rewritten to use register_block_type()
's render_callback
.
Please open a new issue to suggest additional examples of existing usage.
There are no Gutenberg equivalents for this filter.