get_post_gallery WordPress Filter Hook

The get_post_gallery hook is used to retrieve the post gallery for a given post. This hook is fired when the_post_gallery() is called.

apply_filters( 'get_post_gallery', array $gallery, int|WP_Post $post, array $galleries ) #

Filters the first-found post gallery.


Parameters

$gallery

(array)The first-found post gallery.

$post

(int|WP_Post)Post ID or object.

$galleries

(array)Associative array of all found post galleries.


Top ↑

Source

File: wp-includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More