Opened 12 years ago
Closed 12 years ago
#30683 closed defect (bug) (fixed)
Customizer Background does not restore default image
| Reported by: | dreamwhisper | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | high | Milestone: | 4.1 |
| Component: | Customize | Version: | 4.1 |
| Severity: | major | Keywords: | has-patch commit fixed-major |
| Cc: | Focuses: |
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)
#3
@
12 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
@
12 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
unfinished