wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



get_post_gallery_images › WordPress Function

Da3.6.0
Deprecaton/a
get_post_gallery_images ( $post = 0 )
Parametri:
  • (int|WP_Post) $post Optional. Post ID or WP_Post object. Default is global `$post`.
    Richiesto: No
    Default:
Vedi:
Ritorna:
  • (string[]) A list of a gallery's image srcs in order.
Definito a:
Codex:

Checks a post's content for galleries and return the image srcs for the first found gallery.



Sorgenti

function get_post_gallery_images( $post = 0 ) {
	$gallery = get_post_gallery( $post, false );
	return empty( $gallery['src'] ) ? array() : $gallery['src'];
}