Make WordPress Core

Ticket #18041: 18041.patch

File 18041.patch, 1.6 KB (added by billerickson, 13 years ago)
  • wp-admin/custom-background.php

     
    189189        $background_styles .= 'background-color: #' . $bgcolor . ';';
    190190
    191191if ( get_background_image() ) {
     192
     193        // If using default, there won't be a thumbnail so use full image
     194        $background_image = get_theme_mod('background_image_thumb', '');
     195        if (empty($background_image)) $background_image = get_background_image();
     196
    192197        // background-image URL must be single quote, see below
    193         $background_styles .= ' background-image: url(\'' . get_theme_mod('background_image_thumb', '') . '\');'
     198        $background_styles .= ' background-image: url(\'' . $background_image . '\');'
    194199                . ' background-repeat: ' . get_theme_mod('background_repeat', 'repeat') . ';'
    195200                . ' background-position: top ' . get_theme_mod('background_position_x', 'left');
    196201}
    197202?>
    198203<div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above ?>
    199204<?php if ( get_background_image() ) { ?>
    200 <img class="custom-background-image" src="<?php echo get_theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" alt="" /><br />
    201 <img class="custom-background-image" src="<?php echo get_theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" alt="" />
     205<img class="custom-background-image" src="<?php echo $background_image; ?>" style="visibility:hidden;" alt="" /><br />
     206<img class="custom-background-image" src="<?php echo $background_image; ?>" style="visibility:hidden;" alt="" />
    202207<?php } ?>
    203208</div>
    204209<?php } ?>