Make WordPress Core

Ticket #20448: 20448.8.diff

File 20448.8.diff, 1.5 KB (added by nacin, 13 years ago)
  • wp-includes/theme.php

     
    11021102 * @access protected
    11031103 */
    11041104function _custom_background_cb() {
    1105         $background = get_theme_mod( 'background_image' );
     1105        $background = get_background_image();
    11061106        $color = get_theme_mod( 'background_color' );
    11071107
    11081108        if ( ! $background && ! $color )
     
    11291129                $attachment = " background-attachment: $attachment;";
    11301130
    11311131                $style .= $image . $repeat . $position . $attachment;
     1132        } elseif ( get_theme_support( 'custom-background', 'default-image' ) ) {
     1133                $style .= " background-image: none;";
    11321134        }
    11331135?>
    11341136<style type="text/css" id="custom-background-css">
  • wp-includes/post-template.php

     
    501501        if ( is_admin_bar_showing() )
    502502                $classes[] = 'admin-bar';
    503503
    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' ) ) ) )
     504        if ( get_background_color() || get_theme_mod( 'background_image' ) || get_theme_support( 'custom-background', 'default-image' ) )
    508505                $classes[] = 'custom-background';
    509506
    510507        $page = $wp_query->get( 'page' );