WordPress.org

Make WordPress Core

Ticket #24348: 24348.1.patch

File 24348.1.patch, 1.0 KB (added by tollmanz, 11 months ago)
  • wp-includes/media.php

    diff --git a/wp-includes/media.php b/wp-includes/media.php
    index d4a0df3..7644710 100644
    a b function get_post_gallery_images( $post_id = 0 ) { 
    24202420 * 
    24212421 * @param string $attached_size If an attached image is found, the size to display it. 
    24222422 * @param WP_Post $post Optional. Used instead of global $post when passed. 
     2423 * 
     2424 * @return string HTML for the image. Blank string if no image is found. 
    24232425 */ 
    24242426function get_the_post_format_image( $attached_size = 'full', &$post = null ) { 
    24252427        if ( empty( $post ) ) 
    function get_the_post_format_image( $attached_size = 'full', &$post = null ) { 
    25662568                $post->format_content[ $cache_key ] = sprintf( $link_fmt, $html ); 
    25672569                return $post->format_content[ $cache_key ]; 
    25682570        } 
     2571 
     2572        $featured_image = get_the_post_thumbnail( $post->ID, $attached_size ); 
     2573        if ( ! empty( $featured_image ) ) { 
     2574                $image = sprintf( $link_fmt, $featured_image ); 
     2575                $post->format_content[ $cache_key ] = $image; 
     2576                return $image; 
     2577        } 
     2578 
     2579        return ''; 
    25692580} 
    25702581 
    25712582/**