Changeset 13668
- Timestamp:
- 03/11/2010 08:21:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/wp-admin.dev.css
r13620 r13668 3660 3660 } 3661 3661 3662 #custom-background-image { 3663 max-width: 400px; 3664 max-height: 200px; 3665 } 3666 3662 3667 div#custom-background-image img { 3663 3668 max-width: 400px; -
trunk/wp-admin/custom-background.php
r13574 r13668 228 228 <?php screen_icon(); ?> 229 229 <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> 232 232 <?php 233 233 if ( $this->admin_image_div_callback ) { 234 234 call_user_func($this->admin_image_div_callback); 235 235 } else { 236 if ( $bgcolor = get_background_color() ) 237 $bgcolor = ' style="background-color: #' . $bgcolor . ';"'; 238 else 239 $bgcolor = ''; 236 240 ?> 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() ) { ?> 238 243 <img class="custom-background-image" src="<?php background_image(); ?>" /> 244 <?php } ?> 239 245 </div> 240 246 <?php } -
trunk/wp-includes/theme.php
r13574 r13668 1437 1437 function _custom_background_cb() { 1438 1438 $background = get_background_image(); 1439 1440 if ( !$background )1439 $color = get_background_color(); 1440 if ( !$background && !$color ) 1441 1441 return; 1442 1442 … … 1458 1458 else 1459 1459 $attachment = 'background-attachment: fixed;'; 1460 1461 if ( !empty($background ) ) 1462 $image = "background-image: url('$background');"; 1463 else 1464 $image = ''; 1465 1466 if ( !empty($background ) ) 1467 $image = "background-image: url('$background');"; 1468 else 1469 $image = ''; 1470 1471 if ( !empty($color) ) 1472 $color = "background-color: #$color;"; 1473 else 1474 $color = ''; 1460 1475 ?> 1461 1476 <style type="text/css"> 1462 1477 body { 1463 background-color: #<?php background_color(); ?>;1464 background-image: url('<?php background_image(); ?>');1478 <?php echo $image; ?> 1479 <?php echo $color; ?> 1465 1480 <?php echo $repeat; ?> 1466 1481 <?php echo $position; ?>
Note: See TracChangeset
for help on using the changeset viewer.