Ticket #17102: theme.php.diff
File theme.php.diff, 1.3 KB (added by , 10 years ago) |
---|
-
theme.php
1656 1656 if ( ! $background && ! $color ) 1657 1657 return; 1658 1658 1659 $style = $color ? " background-color: #$color;" : '';1659 $style = $color ? " #$color" : ''; 1660 1660 1661 1661 if ( $background ) { 1662 $image = " background-image: url('$background');";1662 $image = " url('$background')"; 1663 1663 1664 1664 $repeat = get_theme_mod( 'background_repeat', 'repeat' ); 1665 1665 if ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) ) 1666 1666 $repeat = 'repeat'; 1667 $repeat = " background-repeat: $repeat;";1667 $repeat = " $repeat"; 1668 1668 1669 1669 $position = get_theme_mod( 'background_position_x', 'left' ); 1670 1670 if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) ) 1671 1671 $position = 'left'; 1672 $position = " background-position: top $position;";1672 $position = " top $position"; 1673 1673 1674 1674 $attachment = get_theme_mod( 'background_attachment', 'scroll' ); 1675 1675 if ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) ) 1676 1676 $attachment = 'scroll'; 1677 $attachment = " background-attachment: $attachment;";1677 $attachment = " $attachment"; 1678 1678 1679 1679 $style .= $image . $repeat . $position . $attachment; 1680 1680 } 1681 1681 ?> 1682 1682 <style type="text/css"> 1683 body { <?php echo trim( $style ); ?> }1683 body { background:<?php echo trim( $style ); ?> } 1684 1684 </style> 1685 1685 <?php 1686 1686 }