Make WordPress Core

Ticket #22461: 22461.5.diff

File 22461.5.diff, 1.6 KB (added by DrewAPicture, 12 years ago)

removes resettext $_POST bits

  • wp-admin/custom-header.php

     
    215215                        return;
    216216                }
    217217
    218                 if ( isset( $_POST['resettext'] ) ) {
    219                         check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
    220                         remove_theme_mod('header_textcolor');
    221                         return;
    222                 }
    223 
    224218                if ( isset( $_POST['removeheader'] ) ) {
    225219                        check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
    226220                        $this->remove_header_image();
     
    632626        $default_color = ' data-default-color="#' . esc_attr( get_theme_support( 'custom-header', 'default-text-color' ) ) . '"';
    633627?>
    634628                <input type="text" name="text-color" id="text-color" value="#<?php echo esc_attr( $header_textcolor ); ?>"<?php echo $default_color; ?> />
     629                <?php if ( current_theme_supports( 'custom-header', 'default-text-color' ) ) : ?>
     630                        <span class="description hide-if-js"><?php printf( __( 'Default: #%s' ), esc_attr( get_theme_support( 'custom-header', 'default-text-color' ) ) ); ?></span>
     631                <?php endif; // default-text-color ?>
    635632        </p>
    636633</td>
    637634</tr>
    638635
    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 
    649636</tbody>
    650637</table>
    651638<?php endif;