+<tr valign="top">
+<th scope="row"><?php _e( 'Preview' ); ?></th>
+<td>
+ <?php if ( $this->admin_image_div_callback ) {
+ call_user_func( $this->admin_image_div_callback );
+ } else {
+ ?>
+ <div id="headimg" style="background-image:url(<?php esc_url ( header_image() ) ?>);max-width:<?php echo get_custom_header()->width; ?>px;height:<?php echo get_custom_header()->height; ?>px;">
+ <?php
+ if ( display_header_text() )
+ $style = ' style="color:#' . get_header_textcolor() . ';"';
+ else
+ $style = ' style="display:none;"';
+ ?>
+ <h1><a id="name" class="displaying-header-text" <?php echo $style; ?> onclick="return false;" href="<?php bloginfo('url'); ?>"><?php bloginfo( 'name' ); ?></a></h1>
+ <div id="desc" class="displaying-header-text" <?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
+ </div>
+ <?php } ?>
+</td>
+</tr>
+<?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
+<tr valign="top">
+<th scope="row"><?php _e( 'Select Image' ); ?></th>
+<td>
+ <p><?php _e( 'You can upload a custom header image to be shown at the top of your site instead of the default one. On the next screen you will be able to crop the image.' ); ?><br />
+ <?php
+ if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
+ printf( __( 'Images of exactly <strong>%1$d × %2$d pixels</strong> will be used as-is.' ) . '<br />', get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ) );
+ } elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) {
+ if ( ! current_theme_supports( 'custom-header', 'flex-width' ) )
+ printf( __( 'Images should be at least <strong>%1$d pixels</strong> wide.' ) . ' ', get_theme_support( 'custom-header', 'width' ) );
+ } elseif ( current_theme_supports( 'custom-header', 'flex-width' ) ) {
+ if ( ! current_theme_supports( 'custom-header', 'flex-height' ) )
+ printf( __( 'Images should be at least <strong>%1$d pixels</strong> tall.' ) . ' ', get_theme_support( 'custom-header', 'height' ) );
+ }
+ if ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) {
+ if ( current_theme_supports( 'custom-header', 'width' ) )
+ printf( __( 'Suggested width is <strong>%1$d pixels</strong>.' ) . ' ', get_theme_support( 'custom-header', 'width' ) );
+ if ( current_theme_supports( 'custom-header', 'height' ) )
+ printf( __( 'Suggested height is <strong>%1$d pixels</strong>.' ) . ' ', get_theme_support( 'custom-header', 'height' ) );
+ }
+ ?></p>
+ <form enctype="multipart/form-data" id="upload-form" method="post" action="<?php echo esc_attr( add_query_arg( 'step', 2 ) ) ?>">
+ <p>
+ <label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
+ <input type="file" id="upload" name="import" />
+ <input type="hidden" name="action" value="save" />
+ <?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?>
+ <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
+ </p>
+ <?php
+ $image_library_url = get_upload_iframe_src( 'image', null, 'library' );
+ $image_library_url = remove_query_arg( 'TB_iframe', $image_library_url );
+ $image_library_url = add_query_arg( array( 'context' => 'custom-header', 'TB_iframe' => 1 ), $image_library_url );
+ ?>
+ <p>
+ <label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
+ <a id="choose-from-library-link" class="button thickbox" href="<?php echo esc_url( $image_library_url ); ?>"><?php _e( 'Choose Image' ); ?></a>
+ </p>
+ </form>
+</td>
+</tr>
+<?php endif; ?>
+</tbody>
+</table>
+
+<form method="post" action="<?php echo esc_attr( add_query_arg( 'step', 1 ) ) ?>">
+<table class="form-table">
+<tbody>
+ <?php if ( get_uploaded_header_images() ) : ?>
+<tr valign="top">
+<th scope="row"><?php _e( 'Uploaded Images' ); ?></th>
+<td>
+ <p><?php _e( 'You can choose one of your previously uploaded headers, or show a random one.' ) ?></p>
+ <?php
+ $this->show_header_selector( 'uploaded' );
+ ?>
+</td>
+</tr>
+ <?php endif;
+ if ( ! empty( $this->default_headers ) ) : ?>
+<tr valign="top">
+<th scope="row"><?php _e( 'Default Images' ); ?></th>
+<td>
+<?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
+ <p><?php _e( 'If you don‘t want to upload your own image, you can use one of these cool headers, or show a random one.' ) ?></p>
+<?php else: ?>
+ <p><?php _e( 'You can use one of these cool headers or show a random one on each page.' ) ?></p>
+<?php endif; ?>
+ <?php
+ $this->show_header_selector( 'default' );
+ ?>
+</td>
+</tr>
+ <?php endif;
+ if ( get_header_image() ) : ?>
+<tr valign="top">
+<th scope="row"><?php _e( 'Remove Image' ); ?></th>
+<td>
+ <p><?php _e( 'This will remove the header image. You will not be able to restore any customizations.' ) ?></p>
+ <?php submit_button( __( 'Remove Header Image' ), 'button', 'removeheader', false ); ?>
+</td>
+</tr>
+ <?php endif;
+
+ $default_image = get_theme_support( 'custom-header', 'default-image' );
+ if ( $default_image && get_header_image() != $default_image ) : ?>
+<tr valign="top">
+<th scope="row"><?php _e( 'Reset Image' ); ?></th>
+<td>
+ <p><?php _e( 'This will restore the original header image. You will not be able to restore any customizations.' ) ?></p>
+ <?php submit_button( __( 'Restore Original Header Image' ), 'button', 'resetheader', false ); ?>
+</td>
+</tr>
+ <?php endif; ?>
+</tbody>
+</table>
+
+<?php if ( current_theme_supports( 'custom-header', 'header-text' ) ) : ?>
+
+<h3><?php _e( 'Header Text' ); ?></h3>
+
+<table class="form-table">
+<tbody>
+<tr valign="top">
+<th scope="row"><?php _e( 'Header Text' ); ?></th>
+<td>
+ <p>
+ <label><input type="checkbox" name="display-header-text" id="display-header-text"<?php checked( display_header_text() ); ?> /> <?php _e( 'Show header text with your image.' ); ?></label>
+ </p>
+</td>
+</tr>
+
+<tr valign="top" class="displaying-header-text">
+<th scope="row"><?php _e( 'Text Color' ); ?></th>
+<td>
+ <p>
+<?php if ( display_header_text() ) : ?>
+ <input type="text" name="text-color" id="text-color" value="#<?php echo esc_attr( get_header_textcolor() ); ?>" />
+<?php else : ?>
+ <input type="text" name="text-color" id="text-color" value="#<?php echo esc_attr( get_theme_support( 'custom-header', 'default-text-color' ) ); ?>" />
+<?php endif; ?>
+ <a href="#" class="hide-if-no-js" id="pickcolor"><?php _e( 'Select a Color' ); ?></a>
+ </p>
+ <div id="color-picker" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
+</td>
+</tr>
+
+ <?php if ( current_theme_supports( 'custom-header', 'default-text-color' ) && get_theme_mod( 'header_textcolor' ) ) { ?>
+<tr valign="top">
+<th scope="row"><?php _e('Reset Text Color'); ?></th>
+<td>
+ <p><?php _e( 'This will restore the original header text. You will not be able to restore any customizations.' ) ?></p>
+ <?php submit_button( __( 'Restore Original Header Text' ), 'button', 'resettext', false ); ?>
+</td>
+</tr>
+ <?php } ?>
+
+</tbody>
+</table>
+<?php endif;
+
+do_action( 'custom_header_options' );
+
+wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
+
+<?php submit_button( null, 'primary', 'save-header-options' ); ?>