Themes: Allow flexible sizes for custom header uploads
|Reported by:||lancewillett||Owned by:||ryan|
Description (last modified by lancewillett)
If a theme allows flexible header images the custom header feature should adjust the crop settings on upload to let the image through.
add_theme_support( 'flexible_header_image_upload', 1000, 200 );
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).
If a theme supports this, list the maximum dimensions in Appearance > Header. If no maximums are defined, leave it blank.
Change History (103)
comment:5 follow-up: ↓ 7 @aaroncampbell — 4 years ago
comment:11 in reply to: ↑ 9 @lancewillett — 4 years ago
- Cc lance@… added
- Keywords 2nd-opinion added
- Summary changed from Themes: Allow users to set the height for custom header image to Themes: Allow any size custom header image
comment:13 @lancewillett — 4 years ago
- Description modified (diff)
- Summary changed from Themes: Allow any size custom header image to Themes: Allow flexible sizes for custom header uploads
comment:15 @lancewillett — 4 years ago
- Keywords has-patch dev-feedback added; needs-patch 2nd-opinion removed
comment:67 @ryan — 4 years ago
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed