Make WordPress Core


Ignore:
Timestamp:
12/03/2013 09:35:26 PM (11 years ago)
Author:
nacin
Message:

Rename the new custom-background arguments passed to add_theme_support().

  • background-position becomes default-position-x
  • background-attachment becomes default-attachment
  • background-repeat becomes default-repeat

These are in line with existing default-image and default-color arguments, and also makes the position argument unambiguous and forwards compatible.

fixes #20816.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-background.php

    r26518 r26594  
    206206    // background-image URL must be single quote, see below
    207207    $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' ) );
    210210}
    211211?>
     
    277277<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Position' ); ?></span></legend>
    278278<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' ) ) ); ?> />
    280280<?php _e('Left') ?>
    281281</label>
    282282<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' ) ) ); ?> />
    284284<?php _e('Center') ?>
    285285</label>
    286286<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' ) ) ); ?> />
    288288<?php _e('Right') ?>
    289289</label>
     
    294294<th scope="row"><?php _e( 'Repeat' ); ?></th>
    295295<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>
    300300</fieldset></td>
    301301</tr>
     
    305305<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Attachment' ); ?></span></legend>
    306306<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' ) ) ); ?> />
    308308<?php _e( 'Scroll' ); ?>
    309309</label>
    310310<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' ) ) ); ?> />
    312312<?php _e( 'Fixed' ); ?>
    313313</label>
Note: See TracChangeset for help on using the changeset viewer.