Changeset 26594
- Timestamp:
- 12/03/2013 09:35:26 PM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/custom-background.php
r26518 r26594 206 206 // background-image URL must be single quote, see below 207 207 $background_styles .= ' background-image: url(\'' . $background_image_thumb . '\');' 208 . ' background-repeat: ' . get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', ' background-repeat' ) ) . ';'209 . ' background-position: top ' . get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', ' background-position' ) );208 . ' background-repeat: ' . get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) . ';' 209 . ' background-position: top ' . get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ); 210 210 } 211 211 ?> … … 277 277 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Position' ); ?></span></legend> 278 278 <label> 279 <input name="background-position-x" type="radio" value="left"<?php checked( 'left', get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', ' background-position' ) ) ); ?> />279 <input name="background-position-x" type="radio" value="left"<?php checked( 'left', get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ) ); ?> /> 280 280 <?php _e('Left') ?> 281 281 </label> 282 282 <label> 283 <input name="background-position-x" type="radio" value="center"<?php checked( 'center', get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', ' background-position' ) ) ); ?> />283 <input name="background-position-x" type="radio" value="center"<?php checked( 'center', get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ) ); ?> /> 284 284 <?php _e('Center') ?> 285 285 </label> 286 286 <label> 287 <input name="background-position-x" type="radio" value="right"<?php checked( 'right', get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', ' background-position' ) ) ); ?> />287 <input name="background-position-x" type="radio" value="right"<?php checked( 'right', get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ) ); ?> /> 288 288 <?php _e('Right') ?> 289 289 </label> … … 294 294 <th scope="row"><?php _e( 'Repeat' ); ?></th> 295 295 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Repeat' ); ?></span></legend> 296 <label><input type="radio" name="background-repeat" value="no-repeat"<?php checked( 'no-repeat', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', ' background-repeat' ) ) ); ?> /> <?php _e('No Repeat'); ?></label>297 <label><input type="radio" name="background-repeat" value="repeat"<?php checked( 'repeat', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', ' background-repeat' ) ) ); ?> /> <?php _e('Tile'); ?></label>298 <label><input type="radio" name="background-repeat" value="repeat-x"<?php checked( 'repeat-x', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', ' background-repeat' ) ) ); ?> /> <?php _e('Tile Horizontally'); ?></label>299 <label><input type="radio" name="background-repeat" value="repeat-y"<?php checked( 'repeat-y', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', ' background-repeat' ) ) ); ?> /> <?php _e('Tile Vertically'); ?></label>296 <label><input type="radio" name="background-repeat" value="no-repeat"<?php checked( 'no-repeat', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) ); ?> /> <?php _e('No Repeat'); ?></label> 297 <label><input type="radio" name="background-repeat" value="repeat"<?php checked( 'repeat', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) ); ?> /> <?php _e('Tile'); ?></label> 298 <label><input type="radio" name="background-repeat" value="repeat-x"<?php checked( 'repeat-x', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) ); ?> /> <?php _e('Tile Horizontally'); ?></label> 299 <label><input type="radio" name="background-repeat" value="repeat-y"<?php checked( 'repeat-y', get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ) ); ?> /> <?php _e('Tile Vertically'); ?></label> 300 300 </fieldset></td> 301 301 </tr> … … 305 305 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Attachment' ); ?></span></legend> 306 306 <label> 307 <input name="background-attachment" type="radio" value="scroll" <?php checked( 'scroll', get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', ' background-attachment' ) ) ); ?> />307 <input name="background-attachment" type="radio" value="scroll" <?php checked( 'scroll', get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) ) ); ?> /> 308 308 <?php _e( 'Scroll' ); ?> 309 309 </label> 310 310 <label> 311 <input name="background-attachment" type="radio" value="fixed" <?php checked( 'fixed', get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', ' background-attachment' ) ) ); ?> />311 <input name="background-attachment" type="radio" value="fixed" <?php checked( 'fixed', get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) ) ); ?> /> 312 312 <?php _e( 'Fixed' ); ?> 313 313 </label> -
trunk/src/wp-includes/theme.php
r26501 r26594 1281 1281 $image = " background-image: url('$background');"; 1282 1282 1283 $repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', ' background-repeat' ) );1283 $repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ); 1284 1284 if ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) ) 1285 1285 $repeat = 'repeat'; 1286 1286 $repeat = " background-repeat: $repeat;"; 1287 1287 1288 $position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', ' background-position' ) );1288 $position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ); 1289 1289 if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) ) 1290 1290 $position = 'left'; 1291 1291 $position = " background-position: top $position;"; 1292 1292 1293 $attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', ' background-attachment' ) );1293 $attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) ); 1294 1294 if ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) ) 1295 1295 $attachment = 'scroll'; … … 1484 1484 $defaults = array( 1485 1485 'default-image' => '', 1486 ' background-repeat'=> 'repeat',1487 ' background-position'=> 'left',1488 ' background-attachment'=> 'scroll',1486 'default-repeat' => 'repeat', 1487 'default-position-x' => 'left', 1488 'default-attachment' => 'scroll', 1489 1489 'default-color' => '', 1490 1490 'wp-head-callback' => '_custom_background_cb',
Note: See TracChangeset
for help on using the changeset viewer.