Make WordPress Core


Ignore:
Timestamp:
03/11/2010 08:21:58 PM (16 years ago)
Author:
ryan
Message:

Custom background color fixes. see #12186

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/custom-background.php

    r13574 r13668  
    228228<?php screen_icon(); ?>
    229229<h2><?php _e('Custom Background'); ?></h2>
    230 <?php if ( get_background_image() ) { ?>
    231 <p><?php _e('This is your current background image.'); ?></p>
     230<?php if ( get_background_image() || get_background_color() ) { ?>
     231<p><?php _e('This is your current background.'); ?></p>
    232232<?php
    233233    if ( $this->admin_image_div_callback ) {
    234234        call_user_func($this->admin_image_div_callback);
    235235    } else {
     236        if ( $bgcolor = get_background_color() )
     237            $bgcolor = ' style="background-color: #' . $bgcolor . ';"';
     238        else
     239            $bgcolor = '';
    236240?>
    237 <div id="custom-background-image" style="background-color: #<?php background_color(); ?>;">
     241<div id="custom-background-image"<?php echo $bgcolor; ?>>
     242<?php if ( get_background_image() ) { ?>
    238243<img class="custom-background-image" src="<?php background_image(); ?>" />
     244<?php } ?>
    239245</div>
    240246<?php }
Note: See TracChangeset for help on using the changeset viewer.