Changeset 21054
- Timestamp:
- 06/11/2012 09:25:05 PM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-customize-manager.php
r21053 r21054 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 -
trunk/wp-includes/js/customize-preview.dev.js
r21013 r21054 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 … … 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() ) … … 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 -
trunk/wp-includes/post-template.php
r21001 r21054 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 -
trunk/wp-includes/theme.php
r21016 r21054 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 … … 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 ?>
Note: See TracChangeset
for help on using the changeset viewer.