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.

git-svn-id: https://develop.svn.wordpress.org/trunk@32081 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2015-04-08 17:28:23 +00:00
parent 7e4fa157a7
commit af4f52bf40
1 changed files with 1 additions and 1 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' );