[wp-trac] [WordPress Trac] #17242: Themes: Allow flexible sizes for custom header uploads

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 1 21:34:36 UTC 2012


#17242: Themes: Allow flexible sizes for custom header uploads
-------------------------------------------+------------------
 Reporter:  lancewillett                   |       Owner:
     Type:  task (blessed)                 |      Status:  new
 Priority:  normal                         |   Milestone:  3.4
Component:  Themes                         |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  dev-feedback has-patch commit  |
-------------------------------------------+------------------

Comment (by aaroncampbell):

 [attachment:17242-height-width.4.diff] fixes the logic in
 `current_theme_supports( 'custom-header', 'flex-*' )` and also limits the
 max-width of a header to 1500px unless the theme specifies otherwise.  You
 can specify a larger max size like this:
 {{{
 // Add support for flexible headers
 $header_args = array(
         'random-default' => true,
         'flex-height' => true,
         'suggested-height' => 200,
         'flex-width' => true,
         'max-width' => 2000,
         'suggested-width' => 950,
 );
 add_theme_support( 'custom-header', $header_args );
 }}}

 The reason for this is that cropping an image that is too wide is
 cumbersome.

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


More information about the wp-trac mailing list