[wp-trac] [WordPress Trac] #24348: Consider the post thumbnail in get_the_post_format_image()

WordPress Trac noreply at wordpress.org
Wed May 15 21:39:46 UTC 2013


#24348: Consider the post thumbnail in get_the_post_format_image()
--------------------------+-----------------------------
 Reporter:  tollmanz      |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Post Formats  |    Version:  trunk
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 `get_the_post_format_image()` makes valiant attempts to locate an image
 for use with a post of image post format.

 The function first attempts to find suitable data in the post format meta
 field. If no image is found there, it grabs the first attached image.
 Finally, if all else fails, it will look in the post content to use the
 first image inserted in the content.

 I think that the function should also consider grabbing the post's
 featured image as a fallback. I would prioritize this right after the post
 format meta data.

 I think this is important in that it seems that using the featured image
 was a common practice for adding an image to a post of image post format.
 I would think that this would help improve back compat for themes that
 have used this practice. Moreover, since grabbing an attached image or an
 image inserted in the post content is merely a guess at the right image to
 use for the post, I think that using the featured image is a better guess
 than either of these methods.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24348>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list