WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get post galleries

Contents

Description

Retrieve galleries from the passed post's content.

Parameters

$post
(mixed) (optional) Post ID or Post object.
Default: None
$html
(boolean) (optional) Whether to return HTML or data in the array.
Default: true

Return

(array) 
A list of arrays, each containing gallery data and srcs parsed from the expanded shortcode.

Usage

 <?php $galleries get_post_galleries$post ); ?> 


Change Log

Source File

get_post_galleries() is located in wp-includes/media.php.

Related

Function ref links

This article is marked as in need of editing. You can help Codex by editing it.