[wp-trac] [WordPress Trac] #38168: custom-background class appear in body class attribute even if theme doesn't support it
WordPress Trac
noreply at wordpress.org
Wed Nov 2 19:24:01 UTC 2016
#38168: custom-background class appear in body class attribute even if theme
doesn't support it
--------------------------------------+------------------------
Reporter: wido | Owner: ocean90
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.7
Component: Customize | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: template
--------------------------------------+------------------------
Description changed by ocean90:
Old description:
> There is an issue when the current theme doesn't support the <strong
> >custom-background</strong> feature but the data ( if previously added )
> is in the database.
>
> To be clear (sorry for my english):
>
> 1. Add the theme support 'custom-background' for example:
> {{{
> add_theme_support( 'custom-background', apply_filters(
> 'twentyseventeen_custom_background_args', array(
> 'default-color' => 'ffffff',
> 'default-image' => '',
> ) ) );
> }}}
>
> 2. Select a color or a background image and check the body class
> attribute that has 'custom-background' class.
>
> 3. Remove the previous code and check for the body class. It's still
> there.
New description:
There is an issue when the current theme doesn't support the 'custom-
background' feature but the data ( if previously added ) is in the
database.
To be clear (sorry for my english):
1. Add the theme support 'custom-background' for example:
{{{
add_theme_support( 'custom-background', apply_filters(
'twentyseventeen_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
}}}
2. Select a color or a background image and check the body class attribute
that has 'custom-background' class.
3. Remove the previous code and check for the body class. It's still
there.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38168#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list