Ticket #20132: 20132.diff
File 20132.diff, 3.1 KB (added by , 13 years ago) |
---|
-
wp-includes/post-template.php
501 501 if ( is_admin_bar_showing() ) 502 502 $classes[] = 'admin-bar'; 503 503 504 if ( get_ background_color() || get_theme_mod( 'background_image' ) || get_theme_support( 'custom-background', 'default-image') )504 if ( get_theme_mod( 'background_color' ) || get_background_image() ) 505 505 $classes[] = 'custom-background'; 506 506 507 507 $page = $wp_query->get( 'page' ); -
wp-includes/class-wp-customize-manager.php
337 337 $settings = array( 338 338 'values' => array(), 339 339 'channel' => esc_js( $_POST['customize_messenger_channel'] ), 340 'backgroundImageHasDefault' => current_theme_supports( 'custom-background', 'default-image' ),341 340 ); 342 341 343 342 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 = '', 113 hasDefault = api.settings.backgroundImageHasDefault; 112 var css = ''; 114 113 115 114 // The body will support custom backgrounds if either 116 115 // the color or image are set. 117 116 // 118 117 // See get_body_class() in /wp-includes/post-template.php 119 body.toggleClass( 'custom-background', !! ( color() || image() || hasDefault) );118 body.toggleClass( 'custom-background', !! ( color() || image() ) ); 120 119 121 120 if ( color() ) 122 121 css += 'background-color: ' + color() + ';'; … … 126 125 css += 'background-position: top ' + position_x() + ';'; 127 126 css += 'background-repeat: ' + repeat() + ';'; 128 127 css += 'background-position: top ' + attachment() + ';'; 129 } else if ( hasDefault ) {130 css += 'background-image: none;';131 128 } 132 129 133 130 // Refresh the stylesheet by removing and recreating it. -
wp-includes/theme.php
1109 1109 // A default has to be specified in style.css. It will not be printed here. 1110 1110 $color = get_theme_mod( 'background_color' ); 1111 1111 1112 if ( ! $background && ! $color && ! get_theme_support( 'custom-background', 'default-image' ))1112 if ( ! $background && ! $color ) 1113 1113 return; 1114 1114 1115 1115 $style = $color ? "background-color: #$color;" : ''; … … 1133 1133 $attachment = " background-attachment: $attachment;"; 1134 1134 1135 1135 $style .= $image . $repeat . $position . $attachment; 1136 } elseif ( get_theme_support( 'custom-background', 'default-image' ) ) {1137 // If there is not a $background, but there is a default, then the default was1138 // removed and an empty value was saved. Remove it:1139 $style .= " background-image: none;";1140 1136 } 1141 1137 ?> 1142 1138 <style type="text/css" id="custom-background-css">