WordPress.org

Make WordPress Core

Changeset 21002


Ignore:
Timestamp:
06/05/12 18:44:31 (5 years ago)
Author:
nacin
Message:

Add some comments to _custom_background_cb() to explain the logic. see #20448.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r21001 r21002  
    11031103 */ 
    11041104function _custom_background_cb() { 
     1105    // $background is the saved custom image, or the default image. 
    11051106    $background = get_background_image(); 
     1107 
     1108    // $color is the saved custom color. 
     1109    // A default has to be specified in style.css. It will not be printed here. 
    11061110    $color = get_theme_mod( 'background_color' ); 
    11071111 
     
    11311135        $style .= $image . $repeat . $position . $attachment; 
    11321136    } elseif ( get_theme_support( 'custom-background', 'default-image' ) ) { 
     1137        // If there is not a $background, but there is a default, then the default was 
     1138        // removed and an empty value was saved. Remove it: 
    11331139        $style .= " background-image: none;"; 
    11341140    } 
Note: See TracChangeset for help on using the changeset viewer.