+?>
+<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 theme_update_available( $ct ); ?>
+ </div>
+
+ <?php
+ // Pretend you didn't see this.
+ $options = array();
+ if ( is_array( $submenu ) && isset( $submenu['themes.php'] ) ) {
+ foreach ( (array) $submenu['themes.php'] as $item) {
+ $class = '';
+ if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] )
+ continue;
+ // 0 = name, 1 = capability, 2 = file
+ if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) )
+ $class = ' class="current"';
+ if ( !empty($submenu[$item[2]]) ) {
+ $submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
+ $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
+ if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
+ $options[] = "<a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
+ else
+ $options[] = "<a href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
+ } else if ( current_user_can($item[1]) ) {
+ if ( file_exists(ABSPATH . 'wp-admin/' . $item[2]) ) {
+ $options[] = "<a href='{$item[2]}'$class>{$item[0]}</a>";
+ } else {
+ $options[] = "<a href='themes.php?page={$item[2]}'$class>{$item[0]}</a>";
+ }
+ }
+ }
+ }