get_post_galleries_images()
Retrieve the image srcs from galleries from a post's content, if present
Uses: get_post_galleries()
1 time — 0.009545 sec (very slow) | 50000 times — 595.55 sec (extremely slow) | PHP 7.0.4, WP 4.4.2
No Hooks.
Return
Array
. A list of lists, each containing image srcs parsed. from an expanded shortcode
Usage
get_post_galleries_images( $post );
- $post(int|WP_Post)
- Post ID or WP_Post object.
Default: global $post
Notes
- See: get_post_galleries()
Changelog
Since 3.6.0 | Introduced. |
Code of get_post_galleries_images() get post galleries images WP 5.9.3
function get_post_galleries_images( $post = 0 ) { $galleries = get_post_galleries( $post, false ); return wp_list_pluck( $galleries, 'src' ); }