WordPress.org

Make WordPress Core

Changeset 32081


Ignore:
Timestamp:
04/08/2015 05:28:23 PM (4 years ago)
Author:
ocean90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r32046 r32081  
    669669    }
    670670
    671     if ( get_theme_mod( 'background_color' ) || get_background_image() )
     671    if ( get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) || get_background_image() )
    672672        $classes[] = 'custom-background';
    673673
Note: See TracChangeset for help on using the changeset viewer.