Index: wp-admin/themes.php
===================================================================
--- wp-admin/themes.php	(revision 21092)
+++ wp-admin/themes.php	(working copy)
@@ -151,9 +151,14 @@
 	<?php
 	// Pretend you didn't see this.
 	$options = array();
+
+	if ( current_user_can( 'edit_theme_options' ) )
+		$options['customize'] =  '<a id="customize-current-theme-link" href="' . wp_customize_url(). '" class="load-customize hide-if-no-customize" title="' . esc_attr( $customize_title ) .'">Customize</a>';
+			
 	if ( is_array( $submenu ) && isset( $submenu['themes.php'] ) ) {
 		foreach ( (array) $submenu['themes.php'] as $item) {
 			$class = '';
+			$name = sanitize_file_name( strtolower( $item[0] ) );
 			if ( 'themes.php' == $item[2] || 'theme-editor.php' == $item[2] )
 				continue;
 			// 0 = name, 1 = capability, 2 = file
@@ -163,40 +168,40 @@
 				$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>";
+					$options[$name] = "<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>";
+					$options[$name] = "<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>";
+					$options[$name] = "<a href='{$item[2]}'$class>{$item[0]}</a>";
 				} else {
-					$options[] = "<a href='themes.php?page={$item[2]}'$class>{$item[0]}</a>";
+					$options[$name] = "<a href='themes.php?page={$item[2]}'$class>{$item[0]}</a>";
 				}
 			}
 		}
 	}
-
-	if ( $options || current_user_can( 'edit_theme_options' ) ) :
+	$options = apply_filters( 'theme_option_links' , $options , $ct->stylesheet );
 	?>
-	<div class="theme-options">
-		<?php if ( current_user_can( 'edit_theme_options' ) ) : ?>
-		<a id="customize-current-theme-link" href="<?php echo wp_customize_url(); ?>" class="load-customize hide-if-no-customize" title="<?php echo esc_attr( $customize_title ); ?>"><?php _e( 'Customize' ); ?></a>
-		<?php
-		endif; // edit_theme_options
-		if ( $options ) :
-		?>
-		<span><?php _e( 'Options:' )?></span>
-		<ul>
-			<?php foreach ( $options as $option ) : ?>
-				<li><?php echo $option; ?></li>
-			<?php endforeach; ?>
-		</ul>
-	</div>
-	<?php
-		endif; // options
-	endif; // options || edit_theme_options
-	?>
 
+	<?php if ( $options || current_user_can( 'edit_theme_options' ) ) { ?>
+		<?php if ( $options ) { ?>
+			<div class="theme-options">				
+				<?php
+					if ( isset( $options['customize'] ) ) { 
+						echo $options['customize']; 
+						unset( $options['customize'] ); 
+					}
+				?>
+				<span><?php _e( 'Options:' )?></span>
+				<ul>
+					<?php foreach ( $options as $key => $option ) : ?>
+						<li class="<?php echo $key; ?>"><?php echo $option; ?></li>
+					<?php endforeach; ?>
+				</ul>
+			</div>
+		<?php }; ?> 
+	<?php }; ?>
+
 </div>
 
 <br class="clear" />
