Ticket #20448: 20448.9.diff
File 20448.9.diff, 2.0 KB (added by , 13 years ago) |
---|
-
wp-includes/theme.php
1102 1102 * @access protected 1103 1103 */ 1104 1104 function _custom_background_cb() { 1105 $background = get_theme_mod( 'background_image' ); 1105 // $background is the saved custom image, or the default image. 1106 $background = get_background_image(); 1107 1108 // $color is the saved custom color. 1109 // A default has to be specified in style.css. It will not be printed here. 1106 1110 $color = get_theme_mod( 'background_color' ); 1107 1111 1108 if ( ! $background && ! $color )1112 if ( ! $background && ! $color && ! get_theme_support( 'custom-background', 'default-image' ) ) 1109 1113 return; 1110 1114 1111 1115 $style = $color ? "background-color: #$color;" : ''; … … 1129 1133 $attachment = " background-attachment: $attachment;"; 1130 1134 1131 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 was 1138 // removed and an empty value was saved. Remove it: 1139 $style .= " background-image: none;"; 1132 1140 } 1133 1141 ?> 1134 1142 <style type="text/css" id="custom-background-css"> -
wp-includes/post-template.php
501 501 if ( is_admin_bar_showing() ) 502 502 $classes[] = 'admin-bar'; 503 503 504 if ( get_theme_mod( 'background_image' ) || get_theme_mod( 'background_color' ) || 505 ( '_custom_background_cb' != get_theme_support( 'custom-background', 'wp-head-callback' ) 506 && ( get_theme_support( 'custom-background', 'default-image' ) || 507 get_theme_support( 'custom-background', 'default-color' ) ) ) ) 504 if ( get_background_color() || get_theme_mod( 'background_image' ) || get_theme_support( 'custom-background', 'default-image' ) ) 508 505 $classes[] = 'custom-background'; 509 506 510 507 $page = $wp_query->get( 'page' );