Opened 10 years ago
Closed 10 years ago
#30683 closed defect (bug) (fixed)
Customizer Background does not restore default image
Reported by: | dreamwhisper | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.1 | Priority: | high |
Severity: | major | Version: | 4.1 |
Component: | Customize | Keywords: | has-patch commit fixed-major |
Focuses: | Cc: |
Description
Related #21483
In 4.1RC, it appears you are not able to reselect a default image after uploading an alternate image.
//* Add support for custom background
add_theme_support( 'custom-background', array(
'default-image' => get_stylesheet_directory_uri() . '/images/bg.png',
'default-color' => 'eee',
) );
Steps to replicate:
- Set a default image in the custom-background function as above
- In the customizer, click Change Image to select a different image
- Click Default Image to restore the original default image
The default image is restored as the thumbnail, but is not displayed as the background on the front end.
In addition, previously, you had the options to:
- Upload an alternate image
- Restore the default image
- Remove the image altogether
All of these options are desirable when specifying a default.
Attachments (3)
Change History (12)
#2
@
10 years ago
- Keywords needs-patch added
- Priority changed from normal to high
- Severity changed from normal to major
#3
@
10 years ago
My patch may work, but totally untested, and there's a lot of inconsistency across themes here. I had a lot of trouble with this in the original patch, and I probably shouldn't look any more deeply here again.
#4
@
10 years ago
- Keywords has-patch needs-testing added; needs-patch removed
30683.2.patch should fix the issue. Needs some more testing.
The underlying issue is that the Customizer can't remove a setting like the Custom Header/Background screen does, see trunk/src/wp-admin/custom-background.php@30657#L174.
#5
@
10 years ago
- Owner set to ocean90
- Resolution set to fixed
- Status changed from new to closed
In 30849:
unfinished