function options_page() { $css = new Thesis_CSS(); $css->baselines(); $css->widths(); $this->optimal_width = $css->widths['container'] - $css->base['page_padding'] * 2; $this->process(); $rtl = get_bloginfo('text_direction') == 'rtl' ? ' rtl' : ''; #wp echo "<div id=\"thesis_options\" class=\"wrap{$rtl}\">\n"; thesis_version_indicator(); thesis_options_title(__('Thesis Header Image', 'thesis'), false); thesis_options_nav(); if ($this->updated) { echo "<div id=\"updated\" class=\"updated fade\">\n\t<p>" . __('Header image updated!', 'thesis') . ' <a href="' . get_bloginfo('url') . '/">' . __('Check out your site →', 'thesis') . "</a></p>\n</div>\n"; } elseif ($this->removed) { echo "<div id=\"updated\" class=\"updated fade\">\n\t<p>" . __('Header image removed!', 'thesis') . ' <a href="' . get_bloginfo('url') . '/">' . __('Check out your site →', 'thesis') . "</a></p>\n</div>\n"; } elseif ($this->error) { echo "<div class=\"warning\"><p>" . __('<strong>Whoops!</strong> You tried to upload an unrecognized file type. The header image uploader only accepts <code>.jpg</code>, <code>.png</code>, or <code>.gif</code> files.', 'thesis') . "</p></div>"; } if ($this->header) { echo "<div id=\"header_preview\">\n\t<img src=\"{$this->header['url']}\" width=\"{$this->header['width']}\" height=\"{$this->header['height']}\" alt=\"header image preview\" title=\"header image preview\" />\n\t<a href=\"" . wp_nonce_url(admin_url('admin.php?page=thesis-header-image&remove=true'), 'thesis-remove-header') . "\" title=\"" . __('Click here to remove this header image', 'thesis') . "\">" . __('Remove Image', 'thesis') . "</a>\n</div>\n"; } ?> <div class="one_col"> <div class="control_area"> <p><?php printf(__('Based on your <a href="%1$s">current layout settings</a>, the optimal header image width is <strong>%2$d pixels</strong>. If your image is wider than this, don’t worry—Thesis will automatically resize it for you!', 'thesis'), admin_url('admin.php?page=thesis-design-options#layout-constructor'), $this->optimal_width); ?> </p> <form enctype="multipart/form-data" id="upload-form" method="post" action="<?php echo admin_url('admin.php?page=thesis-header-image'); ?> "> <p class="remove_bottom_margin"> <label for="upload"><?php _e('Choose an image from your computer:', 'thesis'); ?> </label> <input type="file" class="text" id="upload" name="import" /> <?php wp_nonce_field('thesis-header-upload', '_wpnonce-thesis-header-upload'); ?> <input type="submit" class="ui_button positive" name="upload" value="<?php esc_attr_e('Upload', 'thesis'); ?> " /> </p> </form> </div> </div> <?php echo "</div>\n"; }