[wp-trac] [WordPress Trac] #12146: Post thumbnails should not be affected by $content_width

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 6 08:28:16 UTC 2010


#12146: Post thumbnails should not be affected by $content_width
-----------------------------+----------------------------------------------
 Reporter:  Viper007Bond     |       Owner:           
     Type:  defect (bug)     |      Status:  new      
 Priority:  normal           |   Milestone:  3.0      
Component:  Post Thumbnails  |     Version:  3.0      
 Severity:  normal           |    Keywords:  has-patch
-----------------------------+----------------------------------------------
 {{{
 set_post_thumbnail_size( 940, 198, true );
 $content_width = 640;
 the_post_thumbnail();
 }}}

 Outputs something like this:

 {{{
 <img width="640" height="134" src=".../filename-940x198.png" class
 ="attachment-post-thumbnail wp-post-image" alt="" title="title" />
 }}}

 Note that the thumbnail is being generated correctly, but the HTML
 width/height is being affected by `$content_width`. This should not
 happen. If a theme author wants it to not be wider than the theme width,
 then they wouldn't have set the width to be wider. Post thumbnails can be
 used outside of the content area.

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


More information about the wp-trac mailing list