Changeset 26352
- Timestamp:
- 11/24/2013 02:04:50 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/custom-background.php
r25868 r26352 207 207 // background-image URL must be single quote, see below 208 208 $background_styles .= ' background-image: url(\'' . $background_image_thumb . '\');' 209 . ' background-repeat: ' . get_theme_mod( 'background_repeat', 'repeat') . ';'210 . ' background-position: top ' . get_theme_mod( 'background_position_x', 'left');209 . ' background-repeat: ' . get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'background-repeat' ) ) . ';' 210 . ' background-position: top ' . get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'background-position' ) ); 211 211 } 212 212 ?> … … 278 278 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Position' ); ?></span></legend> 279 279 <label> 280 <input name="background-position-x" type="radio" value="left"<?php checked( 'left', get_theme_mod('background_position_x', 'left')); ?> />280 <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' ) ) ); ?> /> 281 281 <?php _e('Left') ?> 282 282 </label> 283 283 <label> 284 <input name="background-position-x" type="radio" value="center"<?php checked( 'center', get_theme_mod('background_position_x', 'left')); ?> />284 <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' ) ) ); ?> /> 285 285 <?php _e('Center') ?> 286 286 </label> 287 287 <label> 288 <input name="background-position-x" type="radio" value="right"<?php checked( 'right', get_theme_mod('background_position_x', 'left')); ?> />288 <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' ) ) ); ?> /> 289 289 <?php _e('Right') ?> 290 290 </label> … … 295 295 <th scope="row"><?php _e( 'Repeat' ); ?></th> 296 296 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Repeat' ); ?></span></legend> 297 <label><input type="radio" name="background-repeat" value="no-repeat"<?php checked( 'no-repeat', get_theme_mod('background_repeat', 'repeat')); ?> /> <?php _e('No Repeat'); ?></label>298 <label><input type="radio" name="background-repeat" value="repeat"<?php checked( 'repeat', get_theme_mod('background_repeat', 'repeat')); ?> /> <?php _e('Tile'); ?></label>299 <label><input type="radio" name="background-repeat" value="repeat-x"<?php checked( 'repeat-x', get_theme_mod('background_repeat', 'repeat')); ?> /> <?php _e('Tile Horizontally'); ?></label>300 <label><input type="radio" name="background-repeat" value="repeat-y"<?php checked( 'repeat-y', get_theme_mod('background_repeat', 'repeat')); ?> /> <?php _e('Tile Vertically'); ?></label>297 <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> 298 <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> 299 <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> 300 <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> 301 301 </fieldset></td> 302 302 </tr> … … 306 306 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Attachment' ); ?></span></legend> 307 307 <label> 308 <input name="background-attachment" type="radio" value="scroll" <?php checked( 'scroll', get_theme_mod('background_attachment', 'scroll')); ?> />309 <?php _e( 'Scroll')?>308 <input name="background-attachment" type="radio" value="scroll" <?php checked( 'scroll', get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'background-attachment' ) ) ); ?> /> 309 <?php _e( 'Scroll' ); ?> 310 310 </label> 311 311 <label> 312 <input name="background-attachment" type="radio" value="fixed" <?php checked( 'fixed', get_theme_mod('background_attachment', 'scroll')); ?> />313 <?php _e( 'Fixed')?>312 <input name="background-attachment" type="radio" value="fixed" <?php checked( 'fixed', get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'background-attachment' ) ) ); ?> /> 313 <?php _e( 'Fixed' ); ?> 314 314 </label> 315 315 </fieldset></td> -
trunk/src/wp-includes/theme.php
r25272 r26352 1172 1172 $image = " background-image: url('$background');"; 1173 1173 1174 $repeat = get_theme_mod( 'background_repeat', 'repeat');1174 $repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'background-repeat' ) ); 1175 1175 if ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) ) 1176 1176 $repeat = 'repeat'; 1177 1177 $repeat = " background-repeat: $repeat;"; 1178 1178 1179 $position = get_theme_mod( 'background_position_x', 'left');1179 $position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'background-position' ) ); 1180 1180 if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) ) 1181 1181 $position = 'left'; 1182 1182 $position = " background-position: top $position;"; 1183 1183 1184 $attachment = get_theme_mod( 'background_attachment', 'scroll');1184 $attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'background-attachment' ) ); 1185 1185 if ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) ) 1186 1186 $attachment = 'scroll'; … … 1374 1374 1375 1375 $defaults = array( 1376 'default-image' => '', 1377 'default-color' => '', 1378 'wp-head-callback' => '_custom_background_cb', 1379 'admin-head-callback' => '', 1376 'default-image' => '', 1377 'background-repeat' => 'repeat', 1378 'background-position' => 'left', 1379 'background-attachment' => 'scroll', 1380 'default-color' => '', 1381 'wp-head-callback' => '_custom_background_cb', 1382 'admin-head-callback' => '', 1380 1383 'admin-preview-callback' => '', 1381 1384 );
Note: See TracChangeset
for help on using the changeset viewer.