[wp-trac] [WordPress Trac] #11571: Provide easy way to return url of thumbnail image

WordPress Trac noreply at wordpress.org
Thu Nov 28 22:14:35 UTC 2013


#11571: Provide easy way to return url of thumbnail image
------------------------------------------+-----------------------------
 Reporter:  braindrain                    |       Owner:
     Type:  enhancement                   |      Status:  new
 Priority:  normal                        |   Milestone:  Future Release
Component:  Post Thumbnails               |     Version:  2.9
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch needs-testing gsoc  |
------------------------------------------+-----------------------------

Comment (by leewillis77):

 get_the_post_thumbnail_src() is a convenience helper where you just want
 the image URL. I'd agree it's inconsistent with
 wp_get_attachment_image_src() - however making it consistent would lose
 its simplicity.

 The workaround suggested is actually:

 {{{
 $attachment_src = wp_get_attachment_image_src( get_post_thumbnail_id(),
 'post-thumbnail' );
 $src = $attachment_src[0];
 }}}

 compared to:

 {{{
 $attachment_src = get_the_post_thumbnail_src();
 }}}

 I think there's value in the smaller convenience function over the
 inconsistency.

 This ticket has been around for a while. Can it get in 3.9 early - if not,
 and there's no desire to add it - can we / should we close?

--
Ticket URL: <http://core.trac.wordpress.org/ticket/11571#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list