Changeset 22695
- Timestamp:
- 11/20/2012 01:53:59 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-header.php
r22521 r22695 213 213 check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); 214 214 $this->reset_header_image(); 215 return;216 }217 218 if ( isset( $_POST['resettext'] ) ) {219 check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );220 remove_theme_mod('header_textcolor');221 215 return; 222 216 } … … 629 623 $header_textcolor = display_header_text() ? get_header_textcolor() : get_theme_support( 'custom-header', 'default-text-color' ); 630 624 $default_color = ''; 631 if ( current_theme_supports( 'custom-header', 'default-text-color' ) ) 632 $default_color = ' data-default-color="#' . esc_attr( get_theme_support( 'custom-header', 'default-text-color' ) ) . '"'; 625 if ( current_theme_supports( 'custom-header', 'default-text-color' ) ) { 626 $default_color = '#' . get_theme_support( 'custom-header', 'default-text-color' ); 627 $default_color_attr = ' data-default-color="' . esc_attr( $default_color ) . '"'; 628 echo '<input type="text" name="text-color" id="text-color" value="#' . esc_attr( $header_textcolor ) . '"' . $default_color_attr . ' />'; 629 if ( $default_color ) 630 echo ' <span class="description hide-if-js">' . sprintf( _x( 'Default: %s', 'color' ), $default_color ) . '</span>'; 631 } 633 632 ?> 634 <input type="text" name="text-color" id="text-color" value="#<?php echo esc_attr( $header_textcolor ); ?>"<?php echo $default_color; ?> />635 633 </p> 636 634 </td> 637 635 </tr> 638 639 <?php if ( current_theme_supports( 'custom-header', 'default-text-color' ) && get_theme_mod( 'header_textcolor' ) ) { ?>640 <tr valign="top">641 <th scope="row"><?php _e('Reset Text Color'); ?></th>642 <td>643 <p><?php _e( 'This will restore the original header text. You will not be able to restore any customizations.' ) ?></p>644 <?php submit_button( __( 'Restore Original Header Text' ), 'button', 'resettext', false ); ?>645 </td>646 </tr>647 <?php } ?>648 649 636 </tbody> 650 637 </table>
Note: See TracChangeset
for help on using the changeset viewer.