WordPress.org

Make WordPress Core

Ticket #24348: 24348.patch

File 24348.patch, 641 bytes (added by tollmanz, 11 months ago)
  • wp-includes/media.php

    diff --git a/wp-includes/media.php b/wp-includes/media.php
    index 368c7f2..ba177c6 100644
    a b function get_the_post_format_image( $attached_size = 'full', &$post = null ) { 
    24942494                return $post->format_content[ $cache_key ]; 
    24952495        } 
    24962496 
     2497        $featured_image = get_the_post_thumbnail( $post->ID, $attached_size ); 
     2498        if ( ! empty( $featured_image ) ) { 
     2499                $image = sprintf( $link_fmt, $featured_image ); 
     2500                $post->format_content[ $cache_key ] = $image; 
     2501                return $image; 
     2502        } 
     2503 
    24972504        $medias = get_attached_images( $post->ID ); 
    24982505        if ( ! empty( $medias ) ) { 
    24992506                $media = reset( $medias );