+<?php
+if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) : ?>
+<div id="message1" class="updated"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
+<?php elseif ( isset($_GET['activated']) ) :
+ if ( isset( $_GET['previewed'] ) ) { ?>
+ <div id="message2" class="updated"><p><?php printf( __( 'Settings saved and theme activated. <a href="%s">Visit site</a>' ), home_url( '/' ) ); ?></p></div>
+ <?php } else { ?>
+<div id="message2" class="updated"><p><?php printf( __( 'New theme activated. <a href="%s">Visit site</a>' ), home_url( '/' ) ); ?></p></div><?php
+ }
+ elseif ( isset($_GET['deleted']) ) : ?>
+<div id="message3" class="updated"><p><?php _e('Theme deleted.') ?></p></div>
+<?php
+endif;
+
+$ct = wp_get_theme();
+$screenshot = $ct->get_screenshot();
+$class = $screenshot ? 'has-screenshot' : '';
+
+$customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Name') );
+
+?>
+<div id="current-theme" class="<?php echo esc_attr( $class ); ?>">
+ <?php if ( $screenshot ) : ?>
+ <?php if ( current_user_can( 'edit_theme_options' ) ) : ?>
+ <a href="<?php echo wp_customize_url(); ?>" class="load-customize hide-if-no-customize" title="<?php echo esc_attr( $customize_title ); ?>">
+ <img src="<?php echo esc_url( $screenshot ); ?>" alt="<?php esc_attr_e( 'Current theme preview' ); ?>" />
+ </a>
+ <?php endif; ?>
+ <img class="hide-if-customize" src="<?php echo esc_url( $screenshot ); ?>" alt="<?php esc_attr_e( 'Current theme preview' ); ?>" />
+ <?php endif; ?>
+
+ <h3><?php _e('Current Theme'); ?></h3>
+ <h4>
+ <?php echo $ct->display('Name'); ?>
+ </h4>
+
+ <div>
+ <ul class="theme-info">
+ <li><?php printf( __('By %s'), $ct->display('Author') ); ?></li>
+ <li><?php printf( __('Version %s'), $ct->display('Version') ); ?></li>
+ </ul>
+ <p class="theme-description"><?php echo $ct->display('Description'); ?></p>
+ <?php if ( $ct->parent() ) {
+ printf( ' <p class="howto">' . __( 'This <a href="%1$s">child theme</a> requires its parent theme, %2$s.' ) . '</p>',
+ __( 'http://codex.wordpress.org/Child_Themes' ),
+ $ct->parent()->display( 'Name' ) );
+ } ?>
+ <?php theme_update_available( $ct ); ?>
+ </div>