Custom background fixes:

* Specify default background colors for the bundled themes.
* Change the default custom background callback to only operate on saved values, rather than default values.
* Prevent an unsaved default value from overriding a manually modified style.css file.

Props nacin, kobenland
fixes #20448


git-svn-id: https://develop.svn.wordpress.org/trunk@20973 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2012-06-01 20:31:50 +00:00
parent 585d42c273
commit b85e8d138c
4 changed files with 22 additions and 5 deletions

View File

@@ -501,7 +501,10 @@ function get_body_class( $class = '' ) {
if ( is_admin_bar_showing() )
$classes[] = 'admin-bar';
if ( get_background_image() || get_background_color() )
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' ) ) ) )
$classes[] = 'custom-background';
$page = $wp_query->get( 'page' );