WPDev.one
Core Function
View Source on Trac ↗

get_post_galleries()

get_post_galleries( mixed $post, mixed $html = true )

Retrieves galleries from the passed post's content.

Parameters 1 required

Name / Type Description
(int

| WP_Post) $post Post ID or object.

Required
$html
bool

Optional. Whether to return HTML or data in the array. Default true.

Return Value

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

Function Information

Since Version
3.6.0
Source File
wp-includes/media.php
Advertisement