[wp-trac] [WordPress Trac] #22030: After "clear background-color" in design options, still css is added to html-output

WordPress Trac noreply at wordpress.org
Wed Jul 3 21:03:57 UTC 2013


#22030: After "clear background-color" in design options, still css is added to
html-output
--------------------------+-----------------------
 Reporter:  Ov3rfly       |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  3.6
Component:  Appearance    |     Version:  3.4.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------

Comment (by obenland):

 I tried the following approach in `_custom_background_cb()` to cover both
 the customizer and the background admin:
 {{{
 #!php
 <?php

 $color = get_theme_mod( 'background_color' );

 if ( get_theme_support( 'custom-background', 'default-color' ) == $color )
         $color = false;

 if ( ! $background && ! $color )
         return;
 }}}

 For some reason the customizer chokes on that and does not display the
 default color though. It also breaks themes that trust that the value in
 the theme mod gets used.

 [attachment:22030.1.2.diff] fixes it for the background admin, but I'm
 really not sure (how) we can fix it for the customizer.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/22030#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list