Changes from branches/3.1/wp-admin/custom-background.php at r18023 to trunk/wp-admin/custom-background.php at r18010
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-background.php
r18023 r18010 44 44 45 45 /** 46 * PHP4Constructor - Register administration header callback.46 * Constructor - Register administration header callback. 47 47 * 48 48 * @since 3.0.0 … … 51 51 * @return Custom_Background 52 52 */ 53 function Custom_Background($admin_header_callback = '', $admin_image_div_callback = '') {53 function __construct($admin_header_callback = '', $admin_image_div_callback = '') { 54 54 $this->admin_header_callback = $admin_header_callback; 55 55 $this->admin_image_div_callback = $admin_image_div_callback; … … 86 86 '<p>' . __( 'Don’t forget to click on the Save Changes button when you are finished.' ) . '</p>' . 87 87 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 88 '<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Background_S ubPanel" target="_blank">Documentation on Custom Background</a>' ) . '</p>' .88 '<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Background_Screen" target="_blank">Documentation on Custom Background</a>' ) . '</p>' . 89 89 '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' ); 90 90 wp_enqueue_script('custom-background'); … … 238 238 <?php wp_nonce_field('custom-background-upload', '_wpnonce-custom-background-upload') ?> 239 239 <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?> 240 </p>241 240 </form> 242 241 </td> … … 271 270 <th scope="row"><?php _e( 'Repeat' ); ?></th> 272 271 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Repeat' ); ?></span></legend> 273 <label><input type="radio" name="background-repeat" value="no-repeat"<?php checked('no-repeat', get_theme_mod('background_repeat', 'repeat')); ?> > <?php _e('No Repeat'); ?></option></label>274 <label><input type="radio" name="background-repeat" value="repeat"<?php checked('repeat', get_theme_mod('background_repeat', 'repeat')); ?> > <?php _e('Tile'); ?></option></label>275 <label><input type="radio" name="background-repeat" value="repeat-x"<?php checked('repeat-x', get_theme_mod('background_repeat', 'repeat')); ?> > <?php _e('Tile Horizontally'); ?></option></label>276 <label><input type="radio" name="background-repeat" value="repeat-y"<?php checked('repeat-y', get_theme_mod('background_repeat', 'repeat')); ?> > <?php _e('Tile Vertically'); ?></option></label>272 <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> 273 <label><input type="radio" name="background-repeat" value="repeat"<?php checked('repeat', get_theme_mod('background_repeat', 'repeat')); ?> /> <?php _e('Tile'); ?></label> 274 <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> 275 <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> 277 276 </fieldset></td> 278 277 </tr> … … 295 294 <th scope="row"><?php _e( 'Color' ); ?></th> 296 295 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Color' ); ?></span></legend> 296 <?php $show_clear = get_background_color() ? '' : ' style="display:none"'; ?> 297 297 <input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr(get_background_color()) ?>" /> 298 <a class="hide-if-no-js" href="#" id="pickcolor"><?php _e('Select a Color'); ?></a> 298 <a class="hide-if-no-js" href="#" id="pickcolor"><?php _e('Select a Color'); ?></a> <span <?php echo $show_clear; ?>class="hide-if-no-js" id="clearcolor"> (<a href="#"><?php _e( 'Clear' ); ?></a>)</span> 299 299 <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div> 300 300 </fieldset></td> … … 347 347 // Add the meta-data 348 348 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); 349 update_post_meta( $id, '_wp_attachment_is_custom_background', get_option('stylesheet' ) ); 349 350 350 351 set_theme_mod('background_image', esc_url($url));
Note: See TracChangeset
for help on using the changeset viewer.