#20734 closed defect (bug) (fixed)
Registered Background image does not display in preview.
| Reported by: | mfields | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | Customize | Version: | 3.4 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
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)
#2
@
14 years 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" link is clicked, 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?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Does color work?