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

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 28 15:54:39 UTC 2011


#17242: Themes: Allow flexible sizes for custom header uploads
-------------------------------------+------------------
 Reporter:  lancewillett             |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  3.2
Component:  Themes                   |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |
-------------------------------------+------------------
Description changed by lancewillett:

Old description:

> If a theme allows flexible header images the custom header feature should
> adjust the crop settings on upload to let the image through.
>
> '''Theme Support'''
>
> {{{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.
>
> '''Custom Header Code'''
>
> If the theme_support option exists and passes second argument (dimension
> as an 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).
>
> '''Admin UI'''
>
> If a theme supports this, list the maximum dimensions in Appearance >
> Header. If no maximums are defined, leave it blank.

New description:

 If a theme allows flexible header images the custom header feature should
 adjust the crop settings on upload to let the image through.

 '''Theme Support'''

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

 '''Custom Header Code'''

 If the theme_support option exists and passes second argument (dimension
 as an 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).

 '''Admin UI'''

 If a theme supports this, list the maximum dimensions in Appearance >
 Header. If no maximums are defined, leave it blank.

--

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


More information about the wp-trac mailing list