Opened 11 months ago
Last modified 7 months ago
#21000 new defect (bug)
custom-background still include background-image: none; when setting background color
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | 3.4 |
| Severity: | normal | Keywords: | has-patch close |
| Cc: | mdhansen@… |
Description
I am sorry I missed this after the last inclusion before release, but in the function _custom_background_cb()
I overlooked testing logic in the callback before it was released.
if background color was specified but no image, act as if image shouldn't exist
The original complaint was that when you removed (both) the $background and $color that it outputted the background-image: none; However in 3.4 it's not account for $color in the function and !$background
This is the change I am requesting.
if ($background) {
...
line: 1136 - wp-includes/theme.php
} else $style .= ' background-image: none;';
This will make it handle the if ($color && !background) appropriately
Attachments (2)
Change History (10)
comment:1
SergeyBiryukov — 11 months ago
- Version set to 3.4
background-image: none is no longer there. I cannot tell if you are proposing that we add a line or remove a line. Could you build a proper SVN patch so we can get a better idea?
comment:6
MikeHansenMe — 9 months ago
- Keywords needs-testing removed
Tested the patch and it works well. I also recreated the patch so that it will easily apply.
comment:7
MikeHansenMe — 8 months ago
- Cc mdhansen@… added
comment:8
MikeHansenMe — 7 months ago
- Keywords close added
I think this was fixed by another update recently. Now when background-image is not set it will default to the one in the style sheet if there is a rule.

Related: #20132