Uses
Uses | Description |
---|---|
wp-includes/media.php: get_post_gallery() | Check a specified post’s content for gallery and, if present, return the first |
Checks a post’s content for galleries and return the image srcs for the first found gallery
(string[]) A list of a gallery's image srcs in order.
File: wp-includes/media.php
function get_post_gallery_images( $post = 0 ) { $gallery = get_post_gallery( $post, false ); return empty( $gallery['src'] ) ? array() : $gallery['src']; }
Version | Description |
---|---|
3.6.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_post_gallery_images