Make WordPress Core


Ignore:
Timestamp:
06/01/2012 08:31:50 PM (12 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

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

    r20654 r20973  
    502502        $classes[] = 'admin-bar';
    503503
    504     if ( get_background_image() || get_background_color() )
     504    if ( get_theme_mod( 'background_image' ) || get_theme_mod( 'background_color' ) ||
     505        ( '_custom_background_cb' != get_theme_support( 'custom-background', 'wp-head-callback' )
     506            && ( get_theme_support( 'custom-background', 'default-image' ) ||
     507                get_theme_support( 'custom-background', 'default-color' ) ) ) )
    505508        $classes[] = 'custom-background';
    506509
Note: See TracChangeset for help on using the changeset viewer.