get_post_galleries

SummerySummery

Retrieves galleries from the passed post’s content.

Syntax

get_post_galleries( int|WP_Post $post, bool $html = true )

ParametersParameters

$post

(int|WP_Post) (Required) Post ID or object.

$html

(bool) (Optional) Whether to return HTML or data in the array.

Default value: true

ReturnReturn

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

SourceSource

File: wp-includes/media.php


			

ChangelogChangelog

Changelog
Version Description
3.6.0 Introduced.
Scroll to Top