- <h3><a class="<?php echo $thickbox_class; ?>" href="<?php echo $activate_link; ?>"><?php echo $title; ?></a></h3>
- <p><?php echo $description; ?></p>
-<?php if ( $tags ) : ?>
- <p><?php _e('Tags:'); ?> <?php echo join(', ', $tags); ?></p>
-<?php endif; ?>
- <?php theme_update_available( $themes[$theme_name] ); ?>
- <noscript><p class="themeactions"><a href="<?php echo $preview_link; ?>" title="<?php echo $preview_text; ?>"><?php _e('Preview'); ?></a> <a href="<?php echo $activate_link; ?>" title="<?php echo $activate_text; ?>"><?php _e('Activate'); ?></a></p></noscript>
- <div style="display:none;"><a class="previewlink" href="<?php echo $preview_link; ?>"><?php echo $preview_text; ?></a> <a class="activatelink" href="<?php echo $activate_link; ?>"><?php echo $activate_text; ?></a></div>
-<?php endif; // end if not empty theme_name ?>
- </td>
-<?php } // end foreach $cols ?>
-</tr>
-<?php } // end foreach $table ?>
-</table>
-<?php } ?>
+ <?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>
+
+ <?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]) ) {
+ $menu_file = $item[2];
+ if ( false !== ( $pos = strpos( $menu_file, '?' ) ) )
+ $menu_file = substr( $menu_file, 0, $pos );
+ if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) {
+ $options[] = "<a href='{$item[2]}'$class>{$item[0]}</a>";
+ } else {
+ $options[] = "<a href='themes.php?page={$item[2]}'$class>{$item[0]}</a>";
+ }
+ }
+ }
+ }