apply_filters( 'post_gallery', string $output, array $attr, int $instance )

Filters the default gallery shortcode output.

Description Description

If the filtered output isn’t empty, it will be used instead of generating the default gallery template.

Parameters Parameters


(string) The gallery output. Default empty.


(array) Attributes of the gallery shortcode.


(int) Unique numeric ID of this gallery shortcode instance.

Top ↑

Source Source

File: wp-includes/media.php

View on Trac

Top ↑

Changelog Changelog

Version Description
4.2.0 The $instance parameter was added.
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.