Ticket #12186: background-repeat-options.diff
| File background-repeat-options.diff, 1.8 KB (added by , 16 years ago) |
|---|
-
wp-admin/custom-background.php
98 98 } 99 99 100 100 if ( isset($_POST['background-repeat']) ) { 101 if ( in_array($_POST['background-repeat'], array('repeat', 'no-repeat' )) )101 if ( in_array($_POST['background-repeat'], array('repeat', 'no-repeat', 'repeat-x', 'repeat-y')) ) 102 102 $repeat = $_POST['background-repeat']; 103 103 else 104 104 $repeat = 'repeat'; … … 199 199 <input name="background-repeat" type="radio" value="repeat" <?php checked('repeat', get_theme_mod('background_repeat', 'repeat')); ?> /> 200 200 <?php _e('Tile') ?> 201 201 </label> 202 <label> 203 <input name="background-repeat" type="radio" value="repeat-x" <?php checked('repeat-x', get_theme_mod('background_repeat', 'repeat')); ?> /> 204 <?php _e('Horizontally') ?> 205 </label> 206 <label> 207 <input name="background-repeat" type="radio" value="repeat-y" <?php checked('repeat-y', get_theme_mod('background_repeat', 'repeat')); ?> /> 208 <?php _e('Vertically') ?> 209 </label> 202 210 </fieldset></td> 203 211 204 212 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Attachment' ); ?></span></legend> -
wp-includes/theme.php
1443 1443 $repeat = get_theme_mod('background_repeat', 'repeat'); 1444 1444 if ( 'no-repeat' == $repeat ) 1445 1445 $repeat = 'background-repeat: no-repeat;'; 1446 elseif( 'repeat-x' == $repeat ) 1447 $repeat = 'background-repeat: repeat-x;'; 1448 elseif( 'repeat-y' == $repeat ) 1449 $repeat = 'background-repeat: repeat-y;'; 1446 1450 else 1447 1451 $repeat = 'background-repeat: repeat;'; 1448 1452 $position = get_theme_mod('background_position', 'left');