[wp-trac] [WordPress Trac] #17242: Themes: Allow any size custom header image (was: Themes: Allow users to set the height for custom header image)

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 27 06:40:30 UTC 2011


#17242: Themes: Allow any size custom header image
-------------------------------------+------------------------------
 Reporter:  lancewillett             |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Themes                   |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |
-------------------------------------+------------------------------
Changes (by lancewillett):

 * cc: lance@… (added)
 * keywords:  needs-patch => needs-patch 2nd-opinion


Comment:

 Replying to [comment:9 aaroncampbell]:
 > I'm not sure what percentage of themes allow it, but even on fixed width
 themes is not that uncommon to allow the header image to continue out past
 the fixed width.

 I'm seeing now that this could really be for both width and height, as
 ocean90 pointed out initially.

 I think we should go with Nacin's idea that if a theme allows flexible
 header images the custom header code can adjust the crop settings on
 upload to let an image through.

 Idea for the theme notation:

  * {{{add_theme_support( 'allow_flexible_header_height', 200 );}}}
 [[BR]]Where 200 is the maximum height allowed.
  * {{{add_theme_support( 'allow_flexible_header_width', 1000 );}}}
 [[BR]]Where 1000 is the maximum width allowed.

 If the option is on and a second dimension argument is passed (integer),
 and the uploaded image dimension is higher, crop to size. If the uploaded
 image dimension is lower, save it with no crop.

 If the option is on but dimension value is false or 0, let any size
 through (no crop at all).

 The max dimension cropping is "nice-to-have" for this feature — but it
 would make this a great compromise between allowing flexibility while
 allowing theme authors to control the look of their themes to ''some''
 extent.

 It might also help with the case where a user uploads an original
 (potentially huge) image from their camera and want to use it as a header.
 :)

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


More information about the wp-trac mailing list