Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r15248 r16061  
    457457</td>
    458458</tr>
    459 
     459<?php if ( current_theme_supports( 'custom-header-uploads' ) ) : ?>
    460460<tr valign="top">
    461461<th scope="row"><?php _e( 'Upload Image' ); ?></th>
     
    469469        <input type="hidden" name="action" value="save" />
    470470        <?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ) ?>
    471         <input type="submit" class="button" value="<?php esc_attr_e( 'Upload' ); ?>" />
     471        <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
    472472    </p>
    473473    </form>
    474474</td>
    475475</tr>
     476<?php endif; ?>
    476477</tbody>
    477478</table>
     
    484485<th scope="row"><?php _e( 'Default Images' ); ?></th>
    485486<td>
     487<?php if ( current_theme_supports( 'custom-header-uploads' ) ) : ?>
    486488    <p><?php _e( 'If you don&lsquo;t want to upload your own image, you can use one of these cool headers.' ) ?></p>
     489<?php else: ?>
     490    <p><?php _e( 'You can use one of these cool headers.' ) ?>
     491<?php endif; ?>
    487492    <?php
    488493        $this->show_default_header_selector();
     
    497502<td>
    498503    <p><?php _e( 'This will remove the header image. You will not be able to restore any customizations.' ) ?></p>
    499     <input type="submit" class="button" name="removeheader" value="<?php esc_attr_e( 'Remove Header Image' ); ?>" />
     504    <?php submit_button( __( 'Remove Header Image' ), 'button', 'removeheader', false ); ?>
    500505</td>
    501506</tr>
     
    507512<td>
    508513    <p><?php _e( 'This will restore the original header image. You will not be able to restore any customizations.' ) ?></p>
    509     <input type="submit" class="button" name="resetheader" value="<?php esc_attr_e( 'Restore Original Header Image' ); ?>" />
     514    <?php submit_button( __( 'Restore Original Header Image' ), 'button', 'resetheader', false ); ?>
    510515</td>
    511516</tr>
     
    546551<td>
    547552    <p><?php _e( 'This will restore the original header text. You will not be able to restore any customizations.' ) ?></p>
    548     <input type="submit" class="button" name="resettext" value="<?php esc_attr_e( 'Restore Original Header Text' ); ?>" />
     553    <?php submit_button( __( 'Restore Original Header Text' ), 'button', 'resettext', false ); ?>
    549554</td>
    550555</tr>
     
    555560    <?php endif;
    556561
     562do_action( 'custom_header_options' );
     563
    557564wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
    558 <p class="submit"><input type="submit" class="button-primary" name="save-header-options" value="<?php esc_attr_e( 'Save Changes' ); ?>" /></p>
     565
     566<?php submit_button( null, 'primary', 'save-header-options' ); ?>
    559567</form>
    560568</div>
     
    569577    function step_2() {
    570578        check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload');
     579        if ( ! current_theme_supports( 'custom-header-uploads' ) )
     580            wp_die( 'Cheatin&#8217; uh?' );
     581
    571582        $overrides = array('test_form' => false);
    572583        $file = wp_handle_upload($_FILES['import'], $overrides);
     
    627638    </div>
    628639
    629     <p class="submit">
    630640    <input type="hidden" name="x1" id="x1" value="0"/>
    631641    <input type="hidden" name="y1" id="y1" value="0"/>
     
    635645    <input type="hidden" name="oitar" id="oitar" value="<?php echo esc_attr( $oitar ); ?>" />
    636646    <?php wp_nonce_field( 'custom-header-crop-image' ) ?>
    637     <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Crop and Publish' ); ?>" />
     647
     648    <?php submit_button( __( 'Crop and Publish' ) ); ?>
    638649    </p>
    639650</form>
     
    649660    function step_3() {
    650661        check_admin_referer('custom-header-crop-image');
     662        if ( ! current_theme_supports( 'custom-header-uploads' ) )
     663            wp_die( 'Cheatin&#8217; uh?' );
     664
    651665        if ( $_POST['oitar'] > 1 ) {
    652666            $_POST['x1'] = $_POST['x1'] * $_POST['oitar'];
Note: See TracChangeset for help on using the changeset viewer.