Fix removing the default background image for themes that hard-code the default in css. Honor the default background image for themes that do not provide a fallback in css.

* <style> will appear if there is a default image registered. This is the same as 3.3.
* If only a default color is registered, it still assumes it is in the stylesheet, and no <style> will appear. This is a change from 3.3.
* <style> will continue to appear as before if there is a custom background color or image. This is the same as 3.3.
* This then allows for a default background image with background-image: none, overriding style.css. This is new.

Props nacin
see #20448


git-svn-id: https://develop.svn.wordpress.org/trunk@21001 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2012-06-05 18:35:31 +00:00
parent cbc3a81ee0
commit 2dbb51b71f
2 changed files with 5 additions and 6 deletions
+1 -4
View File
@@ -501,10 +501,7 @@ function get_body_class( $class = '' ) {
if ( is_admin_bar_showing() )
$classes[] = 'admin-bar';
if ( get_theme_mod( 'background_image' ) || get_theme_mod( 'background_color' ) ||
( '_custom_background_cb' != get_theme_support( 'custom-background', 'wp-head-callback' )
&& ( get_theme_support( 'custom-background', 'default-image' ) ||
get_theme_support( 'custom-background', 'default-color' ) ) ) )
if ( get_background_color() || get_theme_mod( 'background_image' ) || get_theme_support( 'custom-background', 'default-image' ) )
$classes[] = 'custom-background';
$page = $wp_query->get( 'page' );