[wp-trac] [WordPress Trac] #17262: wp_get_attachment_thumb_file is always false

WordPress Trac noreply at wordpress.org
Fri Feb 15 16:20:43 UTC 2013


#17262: wp_get_attachment_thumb_file is always false
---------------------------------+------------------
 Reporter:  lonnylot             |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  3.6
Component:  Media                |     Version:  3.0
 Severity:  normal               |  Resolution:
 Keywords:  3.3-early has-patch  |
---------------------------------+------------------

Comment (by nacin):

 'thumb' is the old-style thumbnail, prior to proper intermediate sizes
 ('thumbnail' / 'medium' / 'large').

 wp_get_attachment_thumb_url() does return the newer 'thumbnail' if it
 exists, and falls back to wp_get_attachment_thumb_file() if it does not.

 You can see a bit of code history in image_downsize(): "fall back to the
 old thumbnail" in a code comment.

 Not sure what _file() should return in a deprecated situation. _url() is
 basically the old-school form of wp_get_attachment_image_src( $size =
 'thumbnail' ), which returns array( $src, $width, $height ). Which is kind
 of lame.

 So, perhaps they can both be updated to work on 'thumbnail', and then
 left, as wp_get_attachment_thumb_url() is definitely easier, nicer, and
 more obvious to use than wp_get_attachment_image_src()['url'], and
 according to MarkJaquith, is widely used by plugins (probably for that
 reason).

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


More information about the wp-trac mailing list