Make WordPress Core


Ignore:
Timestamp:
06/05/2012 06:35:31 PM (13 years ago)
Author:
ryan
Message:

Fix removing the default background image for themes that hard-code the default in css. Honor the default background image for themes that do not provide a fallback in css.

  • <style> will appear if there is a default image registered. This is the same as 3.3.
  • If only a default color is registered, it still assumes it is in the stylesheet, and no <style> will appear. This is a change from 3.3.
  • <style> will continue to appear as before if there is a custom background color or image. This is the same as 3.3.
  • This then allows for a default background image with background-image: none, overriding style.css. This is new.

Props nacin
see #20448

File:
1 edited

Legend:

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

    r20973 r21001  
    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
Note: See TracChangeset for help on using the changeset viewer.