Opened 12 years ago
Closed 12 years ago
#21130 closed defect (bug) (fixed)
Custom Header Preview Display Issue
Reported by: | JarretC | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.4 |
Component: | Themes | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
If you have a theme that utilizes the custom header function but a height value isn't defined the site title and site description clash Select Image table row.
The patch which adds height: auto !important; to #headimg should rectify this issue.
Screenshot shows the issue especially with a large amount of text used in the site description.
Attachments (8)
Change History (20)
#2
@
12 years ago
Twentyeleven issues callbacks to correct these issues. If you remove the height option, wp-head-callback, admin-head-callback and admin-preview-callback from Twentyeleven functions.php the issue shows up.
So most likely not an issue in most cases, but it does appear.
#3
@
12 years ago
- Keywords reporter-feedback removed
Ah, I see now. With the height option not set and the callbacks removed, we get this:
<div id="headimg" style="background-image:url();max-width:1000px;height:0px;">
In 3.3, with HEADER_IMAGE_HEIGHT
not set (I guess it was required though) and the callbacks removed:
<div id="headimg" style="max-width:1000px;height:HEADER_IMAGE_HEIGHTpx;background-image:url();">
#4
@
12 years ago
- Component changed from UI to Themes
- Milestone changed from Awaiting Review to 3.5
We could probably only add max-width
and height
attributes if they are not empty (21130.patch).
#5
follow-up:
↓ 11
@
12 years ago
The patch has an additional bonus of properly escaping the header image URL. Currently the esc_url()
call is pointless, header_image()
prints the value directly.
#6
@
12 years ago
Height issue still applies when a value is define, see screenshot. Setting height to auto fixes though not sure if best approach.
#7
@
12 years ago
If a theme sets some value, I guess we should respect that for the most accurate results.
21130.3.patch adds overflow: hidden
to prevent the overlapping.
#8
@
12 years ago
True, was thinking that originally although wasn't too keen on cutting off the text.
@
12 years ago
Better to save the result as $custom_header than calling get_custom_header() four times?
#9
@
12 years ago
Minor tweak, just pulled out a function call and stashed the result in a variable.
Hmm, I can only reproduce this if a theme provides a custom admin preview callback, and sets a fixed height for
#headimg
in that function.In Twenty Eleven, I tried removing
height
value from$custom_header_support
array, setting it to 0 and removingflex-height
as well. Looks fine in all cases: 21130.twenty-eleven.png.Sounds like a particular theme issue.