WordPress.org

Make WordPress Core

Ticket #24270: 24270.diff

File 24270.diff, 531 bytes (added by kovshenin, 12 months ago)
  • wp-includes/media.php

     
    23422342function get_post_galleries( $post_id = 0, $html = true ) { 
    23432343        $post = empty( $post_id ) ? clone get_post() : get_post( $post_id ); 
    23442344        if ( empty( $post ) || ! has_shortcode( $post->post_content, 'gallery' )  ) 
    2345                 return array(); 
     2345                return $html ? '' : array(); 
    23462346 
    23472347        return get_content_galleries( $post->post_content, $html ); 
    23482348}