diff --git a/wp-includes/media.php b/wp-includes/media.php
index e63e5bb..1693ec8 100644
|
a
|
b
|
function get_post_galleries_images( $post_id = 0 ) { |
| 2320 | 2320 | * |
| 2321 | 2321 | * @param int $post_id Optional. Post ID. |
| 2322 | 2322 | * @param boolean $html Whether to return HTML or data |
| 2323 | | * @return array Gallery data and srcs parsed from the expanded shortcode |
| | 2323 | * @return string|array Gallery data and srcs parsed from the expanded shortcode |
| 2324 | 2324 | */ |
| 2325 | 2325 | function get_post_gallery( $post_id = 0, $html = true ) { |
| 2326 | 2326 | if ( ! $post = get_post( $post_id ) ) |
| 2327 | | return array(); |
| | 2327 | return $html ? '' : array(); |
| 2328 | 2328 | |
| 2329 | 2329 | if ( ! has_shortcode( $post->post_content, 'gallery' ) ) |
| 2330 | | return array(); |
| | 2330 | return $html ? '' : array(); |
| 2331 | 2331 | |
| 2332 | 2332 | $data = get_content_galleries( $post->post_content, $html, false, 1 ); |
| 2333 | 2333 | return reset( $data ); |