Make WordPress Core


Ignore:
Timestamp:
02/18/2010 03:12:05 AM (15 years ago)
Author:
ryan
Message:

Add defaults for background option radios. see #12186

File:
1 edited

Legend:

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

    r13188 r13189  
    13731373 */
    13741374function add_custom_background($header_callback = '', $admin_header_callback = '', $admin_image_div_callback = '') {
     1375    if ( isset($GLOBALS['custom_background']) )
     1376        return;
     1377
    13751378    if ( empty($header_callback) )
    13761379        $header_callback = '_custom_background_cb';
     
    13981401        return;
    13991402
    1400     $repeat = get_theme_mod('background_repeat');
     1403    $repeat = get_theme_mod('background_repeat', 'repeat');
    14011404    if ( 'no-repeat' == $repeat )
    14021405        $repeat = 'background-repeat: no-repeat;';
    14031406    else
    14041407        $repeat = 'background-repeat: repeat;';
    1405     $position = get_theme_mod('background_position');
     1408    $position = get_theme_mod('background_position', 'left');
    14061409    if  ( 'center' == $position )
    14071410        $position = 'background-position-x: center;';
     
    14101413    else
    14111414        $position = 'background-position-x: left;';
    1412     $attachment = get_theme_mod('background_attachment');
     1415    $attachment = get_theme_mod('background_attachment', 'fixed');
    14131416    if ( 'scroll' == $attachment )
    14141417        $attachment = 'background-attachment: scroll;';
Note: See TracChangeset for help on using the changeset viewer.