Changeset 13856 for trunk/wp-includes/theme.php
- Timestamp:
- 03/28/2010 02:53:04 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r13829 r13856 1452 1452 return; 1453 1453 1454 $repeat = get_theme_mod('background_repeat', 'repeat'); 1455 if ( 'no-repeat' == $repeat ) 1456 $repeat = 'background-repeat: no-repeat;'; 1457 else 1458 $repeat = 'background-repeat: repeat;'; 1459 $position = get_theme_mod('background_position', 'left'); 1460 if ( 'center' == $position ) 1461 $position = 'background-position: top center;'; 1462 elseif ( 'right' == $position ) 1463 $position = 'background-position: top right;'; 1464 else 1465 $position = 'background-position: top left;'; 1466 $attachment = get_theme_mod('background_attachment', 'fixed'); 1467 if ( 'scroll' == $attachment ) 1454 switch ( get_theme_mod('background_repeat', 'repeat') ) { 1455 case 'no-repeat': 1456 $repeat = 'background-repeat: no-repeat;'; 1457 break; 1458 case 'repeat-x': 1459 $repeat = 'background-repeat: repeat-x;'; 1460 break; 1461 case 'repeat-y': 1462 $repeat = 'background-repeat: repeat-y;'; 1463 break; 1464 default: 1465 $repeat = 'background-repeat: repeat;'; 1466 } 1467 1468 switch ( get_theme_mod('background_position', 'left') ) { 1469 case 'center': 1470 $position = 'background-position: top center;'; 1471 break; 1472 case 'right': 1473 $position = 'background-position: top right;'; 1474 break; 1475 default: 1476 $position = 'background-position: top left;'; 1477 } 1478 1479 if ( 'scroll' == get_theme_mod('background_attachment', 'fixed') ) 1468 1480 $attachment = 'background-attachment: scroll;'; 1469 1481 else 1470 1482 $attachment = 'background-attachment: fixed;'; 1471 1472 if ( !empty($background ) )1473 $image = "background-image: url('$background');";1474 else1475 $image = '';1476 1483 1477 1484 if ( !empty($background ) )
Note: See TracChangeset
for help on using the changeset viewer.