Don't print the `custom-background` class in `body_class()` when a default color is in use.

`.custom-background` should only be added if a background color or an image divert from their defaults. This behavior exists already in `_custom_background_cb()`.

props slobodanmanic, nitkr, valendesigns, obenland.
see [21054], [21001].
fixes #28687.
Built from https://develop.svn.wordpress.org/trunk@32081


git-svn-id: http://core.svn.wordpress.org/trunk@32060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2015-04-08 17:29:26 +00:00
parent 7aeea37d47
commit 6c02682838
2 changed files with 2 additions and 2 deletions

View File

@ -668,7 +668,7 @@ function get_body_class( $class = '' ) {
$classes[] = 'no-customize-support';
}
if ( get_theme_mod( 'background_color' ) || get_background_image() )
if ( get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) || get_background_image() )
$classes[] = 'custom-background';
$page = $wp_query->get( 'page' );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-beta4-32080';
$wp_version = '4.2-beta4-32081';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.