#20734 closed defect (bug) (fixed)
Registered Background image does not display in preview.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | Appearance | Version: | 3.4 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: |
Description
I'm using code similar to the following to register custom background support on the latest version of trunk with a clean database:
function mytheme_register_custom_background_support() {
add_theme_support( 'custom-background', array(
'default-color' => 'f6f4f2',
'default-image' => get_template_directory_uri() . '/images/background.png',
) );
}
add_action( 'after_setup_theme', 'mytheme_register_custom_background_support' );
When I navigate to Appearance -> Background, I only see the background color in the "Preview" box. I would assume that the image should be shown here as well if a url is supplied as default-image in the add_theme_support() call.
I'll uploaded a patch which works for me, but may not be the best solution.
Attachments (1)
Change History (7)
comment:1
nacin
— 13 months ago
- Keywords commit added; dev-feedback removed
- Milestone changed from Awaiting Review to 3.4
comment:2
mfields
— 13 months ago
Color appears to work fine upon theme activation - displaying the default-color automatically. However, after a custom color was selected and then the clear button is pressed, the preview shows a white background. I think that it might be best to revert to the value of default-color is specified. What do you think?
comment:4
nacin
— 13 months ago
I think that it might be best to revert to the value of default-color is specified. What do you think?
That would certainly make sense, yes. I recalled running into that, which is why I asked.
comment:5
nacin
— 13 months ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In [20901]:
comment:36
nacin
— 13 months ago
In [21004]:
Does color work?