get_post_galleries filter-hookWP 3.6.0

Filters the list of all found galleries in the given post.

Usage

add_filter( 'get_post_galleries', 'wp_kama_get_post_galleries_filter', 10, 2 );

/**
 * Function for `get_post_galleries` filter-hook.
 * 
 * @param array   $galleries Associative array of all found post galleries.
 * @param WP_Post $post      Post object.
 *
 * @return array
 */
function wp_kama_get_post_galleries_filter( $galleries, $post ){

	// filter...
	return $galleries;
}
$galleries(array)
Associative array of all found post galleries.
$post(WP_Post)
Post object.

Changelog

Since 3.6.0 Introduced.

Where the hook is called

get_post_galleries()
get_post_galleries
wp-includes/media.php 4895
return apply_filters( 'get_post_galleries', $galleries, $post );

Where the hook is used in WordPress

Usage not found.