Ticket #20448: 20448.12.diff
File 20448.12.diff, 1.6 KB (added by , 13 years ago) |
---|
-
wp-includes/class-wp-customize-manager.php
312 312 $settings = array( 313 313 'values' => array(), 314 314 'channel' => esc_js( $_POST['customize_messenger_channel'] ), 315 'backgroundImageHasDefault' => current_theme_supports( 'custom-background', 'default-image' ), 315 316 ); 316 317 317 318 foreach ( $this->settings as $id => $setting ) { -
wp-includes/js/customize-preview.dev.js
109 109 return; 110 110 111 111 update = function() { 112 var css = ''; 112 var css = '', 113 hasDefault = api.settings.backgroundImageHasDefault; 113 114 114 115 // The body will support custom backgrounds if either 115 116 // the color or image are set. 116 117 // 117 118 // See get_body_class() in /wp-includes/post-template.php 118 body.toggleClass( 'custom-background', !! ( color() || image() ) );119 body.toggleClass( 'custom-background', !! ( color() || image() || hasDefault ) ); 119 120 120 121 if ( color() ) 121 122 css += 'background-color: ' + color() + ';'; … … 125 126 css += 'background-position: top ' + position_x() + ';'; 126 127 css += 'background-repeat: ' + repeat() + ';'; 127 128 css += 'background-position: top ' + attachment() + ';'; 129 } else if ( hasDefault ) { 130 css += 'background-image: none;'; 128 131 } 129 132 130 133 // Refresh the stylesheet by removing and recreating it.