[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
Mon Sep 26 22:46:17 UTC 2016


#38168: custom-background class appear in body class attribute even if theme
doesn't support it
--------------------------+-----------------------------
 Reporter:  wido          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  4.6.1
 Severity:  normal        |   Keywords:
  Focuses:  template      |
--------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38168>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list