Changeset 13189
- Timestamp:
- 02/18/2010 03:12:05 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-background.php
r13186 r13189 173 173 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Position' ); ?></span></legend> 174 174 <label> 175 <input name="background-position" type="radio" value="left" <?php checked('left', get_theme_mod('background_position' )); ?> />175 <input name="background-position" type="radio" value="left" <?php checked('left', get_theme_mod('background_position', 'left')); ?> /> 176 176 <?php _e('Left') ?> 177 177 </label> 178 178 <label> 179 <input name="background-position" type="radio" value="center" <?php checked('center', get_theme_mod('background_position' )); ?> />179 <input name="background-position" type="radio" value="center" <?php checked('center', get_theme_mod('background_position', 'left')); ?> /> 180 180 <?php _e('Center') ?> 181 181 </label> 182 182 <label> 183 <input name="background-position" type="radio" value="right" <?php checked('right', get_theme_mod('background_position' )); ?> />183 <input name="background-position" type="radio" value="right" <?php checked('right', get_theme_mod('background_position', 'left')); ?> /> 184 184 <?php _e('Right') ?> 185 185 </label> … … 188 188 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Repeat' ); ?></span></legend> 189 189 <label> 190 <input name="background-repeat" type="radio" value="no-repeat" <?php checked('no-repeat', get_theme_mod('background_repeat' )); ?> />190 <input name="background-repeat" type="radio" value="no-repeat" <?php checked('no-repeat', get_theme_mod('background_repeat', 'repeat')); ?> /> 191 191 <?php _e('No repeat') ?> 192 192 </label> 193 193 <label> 194 <input name="background-repeat" type="radio" value="repeat" <?php checked('repeat', get_theme_mod('background_repeat' )); ?> />194 <input name="background-repeat" type="radio" value="repeat" <?php checked('repeat', get_theme_mod('background_repeat', 'repeat')); ?> /> 195 195 <?php _e('Tile') ?> 196 196 </label> … … 199 199 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Attachment' ); ?></span></legend> 200 200 <label> 201 <input name="background-attachment" type="radio" value="scroll" <?php checked('scroll', get_theme_mod('background_attachment' )); ?> />201 <input name="background-attachment" type="radio" value="scroll" <?php checked('scroll', get_theme_mod('background_attachment', 'fixed')); ?> /> 202 202 <?php _e('Scroll') ?> 203 203 </label> 204 204 <label> 205 <input name="background-attachment" type="radio" value="fixed" <?php checked('fixed', get_theme_mod('background_attachment' )); ?> />205 <input name="background-attachment" type="radio" value="fixed" <?php checked('fixed', get_theme_mod('background_attachment', 'fixed')); ?> /> 206 206 <?php _e('Fixed') ?> 207 207 </label> -
trunk/wp-includes/theme.php
r13188 r13189 1373 1373 */ 1374 1374 function add_custom_background($header_callback = '', $admin_header_callback = '', $admin_image_div_callback = '') { 1375 if ( isset($GLOBALS['custom_background']) ) 1376 return; 1377 1375 1378 if ( empty($header_callback) ) 1376 1379 $header_callback = '_custom_background_cb'; … … 1398 1401 return; 1399 1402 1400 $repeat = get_theme_mod('background_repeat' );1403 $repeat = get_theme_mod('background_repeat', 'repeat'); 1401 1404 if ( 'no-repeat' == $repeat ) 1402 1405 $repeat = 'background-repeat: no-repeat;'; 1403 1406 else 1404 1407 $repeat = 'background-repeat: repeat;'; 1405 $position = get_theme_mod('background_position' );1408 $position = get_theme_mod('background_position', 'left'); 1406 1409 if ( 'center' == $position ) 1407 1410 $position = 'background-position-x: center;'; … … 1410 1413 else 1411 1414 $position = 'background-position-x: left;'; 1412 $attachment = get_theme_mod('background_attachment' );1415 $attachment = get_theme_mod('background_attachment', 'fixed'); 1413 1416 if ( 'scroll' == $attachment ) 1414 1417 $attachment = 'background-attachment: scroll;';
Note: See TracChangeset
for help on using the changeset viewer.