<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[20138] trunk/wp-admin: Theme Customizer: Begin integration into the install process.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/20138">20138</a></dd>
<dt>Author</dt> <dd>koopersmith</dd>
<dt>Date</dt> <dd>2012-03-07 17:35:17 +0000 (Wed, 07 Mar 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Theme Customizer: Begin integration into the install process. Combine previews, details, and install into a single workflow. see <a href="http://core.trac.wordpress.org/ticket/19910">#19910</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincsswpadmindevcss">trunk/wp-admin/css/wp-admin.dev.css</a></li>
<li><a href="#trunkwpadminincludesclasswpthemeinstalllisttablephp">trunk/wp-admin/includes/class-wp-theme-install-list-table.php</a></li>
<li><a href="#trunkwpadminincludesthemeinstallphp">trunk/wp-admin/includes/theme-install.php</a></li>
<li><a href="#trunkwpadminjsthemedevjs">trunk/wp-admin/js/theme.dev.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkwpadminimagesstarspng">trunk/wp-admin/images/stars.png</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincsswpadmindevcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/wp-admin.dev.css (20137 => 20138)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/wp-admin.dev.css        2012-03-07 17:02:22 UTC (rev 20137)
+++ trunk/wp-admin/css/wp-admin.dev.css        2012-03-07 17:35:17 UTC (rev 20138)
</span><span class="lines">@@ -5224,7 +5224,9 @@
</span><span class="cx">         right: 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.wp-full-overlay.collapsed {
</del><ins>+.wp-full-overlay.collapsed,
+.wp-full-overlay.collapsed div.wp-full-overlay-header,
+.wp-full-overlay.collapsed div.wp-full-overlay-footer {
</ins><span class="cx">         left: -302px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5248,6 +5250,9 @@
</span><span class="cx">         top: 0;
</span><span class="cx">         bottom: 0;
</span><span class="cx"> }
</span><ins>+.wp-full-overlay.collapsed .wp-full-overlay-main {
+        left: 0;
+}
</ins><span class="cx"> 
</span><span class="cx"> .wp-full-overlay-sidebar div.wp-full-overlay-header,
</span><span class="cx"> .wp-full-overlay-sidebar div.wp-full-overlay-footer {
</span><span class="lines">@@ -5322,7 +5327,10 @@
</span><span class="cx"> 
</span><span class="cx"> /* Animations */
</span><span class="cx"> .wp-full-overlay,
</span><del>-.wp-full-overlay .collapse-sidebar {
</del><ins>+.wp-full-overlay .collapse-sidebar,
+.wp-full-overlay-sidebar div.wp-full-overlay-header,
+.wp-full-overlay-sidebar div.wp-full-overlay-footer,
+.wp-full-overlay-main {
</ins><span class="cx">         -moz-transition-property: left, right, top, bottom;
</span><span class="cx">         -webkit-transition-property: left, right, top, bottom;
</span><span class="cx">         -o-transition-property: left, right, top, bottom;
</span><span class="lines">@@ -5347,12 +5355,68 @@
</span><span class="cx">         display: block;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#customize-container iframe {
</del><ins>+#customize-container iframe,
+#theme-installer iframe {
</ins><span class="cx">         height: 100%;
</span><span class="cx">         width: 100%;
</span><span class="cx">         z-index: 20;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#theme-installer {
+        display: none;
+}
+
+.install-theme-info {
+        display: none;
+        padding: 45px 20px 15px;
+}
+
+#theme-installer .install-theme-info {
+        display: block;
+}
+
+.install-theme-info .theme-install {
+        float: right;
+        margin-top: 18px;
+}
+
+.install-theme-info .theme-name {
+        font-size: 16px;
+        line-height: 24px;
+        margin-bottom: 0;
+}
+
+.install-theme-info .theme-screenshot {
+        margin-top: 15px;
+        width: 258px;
+        border: 1px solid #ccc;
+}
+
+.install-theme-info .theme-version {
+        margin: 15px 0;
+        float: right;
+}
+
+.install-theme-info .theme-rating {
+        margin: 14px 0;
+        width: 100px;
+        height: 17px;
+        float: left;
+        background: url('../images/stars.png?ver=20120307') repeat-x bottom left;
+}
+.install-theme-info .theme-rating div {
+        background: url('../images/stars.png?ver=20120307') repeat-x top left;
+        height: 17px;
+        float: left;
+}
+
+.install-theme-info .theme-description {
+        margin-top: 34px;
+        padding-top: 1em;
+        color: #777;
+        line-height: 20px;
+}
+
</ins><span class="cx"> /*------------------------------------------------------------------------------
</span><span class="cx">   25.0 - Misc
</span><span class="cx"> ------------------------------------------------------------------------------*/
</span></span></pre></div>
<a id="trunkwpadminimagesstarspng"></a>
<div class="binary"><h4>Added: trunk/wp-admin/images/stars.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/wp-admin/images/stars.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkwpadminincludesclasswpthemeinstalllisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-theme-install-list-table.php (20137 => 20138)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-theme-install-list-table.php        2012-03-07 17:02:22 UTC (rev 20137)
+++ trunk/wp-admin/includes/class-wp-theme-install-list-table.php        2012-03-07 17:35:17 UTC (rev 20138)
</span><span class="lines">@@ -158,6 +158,18 @@
</span><span class="cx">                                                 display_theme( $themes[$theme_name] );
</span><span class="cx">                                 ?&gt;&lt;/div&gt;
</span><span class="cx">                 &lt;?php } // end foreach $theme_names
</span><ins>+
+                ?&gt;
+                &lt;div id=&quot;theme-installer&quot; class=&quot;wp-full-overlay&quot;&gt;
+                        &lt;a href=&quot;#&quot; class=&quot;close-full-overlay&quot;&gt;&lt;?php printf( __( '&amp;larr; Return to %s' ), get_admin_page_title() ); ?&gt;&lt;/a&gt;
+                        &lt;a href=&quot;#&quot; class=&quot;collapse-sidebar button-secondary&quot; title=&quot;&lt;?php esc_attr_e('Collapse Sidebar'); ?&gt;&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;
+                        &lt;div class=&quot;wp-full-overlay-sidebar&quot;&gt;
+                                &lt;div class=&quot;wp-full-overlay-header&quot;&gt;&lt;/div&gt;
+                                &lt;div class=&quot;install-theme-info&quot;&gt;&lt;/div&gt;
+                        &lt;/div&gt;
+                        &lt;div class=&quot;wp-full-overlay-main&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+                &lt;?php
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -170,7 +182,7 @@
</span><span class="cx">          * @uses $type Global; type of search.
</span><span class="cx">          */
</span><span class="cx">         function _js_vars() {
</span><del>-                global $tab, $type;                
</del><ins>+                global $tab, $type;
</ins><span class="cx">                 parent::_js_vars( compact( 'tab', 'type' ) );
</span><span class="cx">         }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadminincludesthemeinstallphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/theme-install.php (20137 => 20138)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/theme-install.php        2012-03-07 17:02:22 UTC (rev 20137)
+++ trunk/wp-admin/includes/theme-install.php        2012-03-07 17:35:17 UTC (rev 20138)
</span><span class="lines">@@ -127,77 +127,72 @@
</span><span class="cx"> }
</span><span class="cx"> add_action('install_themes_upload', 'install_themes_upload', 10, 1);
</span><span class="cx"> 
</span><del>-function display_theme($theme, $actions = null, $show_details = true) {
</del><ins>+/*
+ * Prints a theme on the Install Themes pages.
+ *
+ * @param object $theme An object that contains theme data returned by the WordPress.org API.
+ *
+ * Example theme data:
+ *   object(stdClass)[59]
+ *     public 'name' =&gt; string 'Magazine Basic' (length=14)
+ *     public 'slug' =&gt; string 'magazine-basic' (length=14)
+ *     public 'version' =&gt; string '1.1' (length=3)
+ *     public 'author' =&gt; string 'tinkerpriest' (length=12)
+ *     public 'preview_url' =&gt; string 'http://wp-themes.com/?magazine-basic' (length=36)
+ *     public 'screenshot_url' =&gt; string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' (length=68)
+ *     public 'rating' =&gt; float 80
+ *     public 'num_ratings' =&gt; int 1
+ *     public 'homepage' =&gt; string 'http://wordpress.org/extend/themes/magazine-basic' (length=49)
+ *     public 'description' =&gt; string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by &lt;a href=&quot;http://bavotasan.com&quot;&gt;c.bavota&lt;/a&gt; of &lt;a href=&quot;http://tinkerpriestmedia.com&quot;&gt;Tinker Priest Media&lt;/a&gt;.' (length=214)
+ *     public 'download_link' =&gt; string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66)
+ */
+function display_theme( $theme ) {
</ins><span class="cx">         global $themes_allowedtags;
</span><span class="cx"> 
</span><del>-        if ( empty($theme) )
</del><ins>+        if ( empty( $theme ) )
</ins><span class="cx">                 return;
</span><span class="cx"> 
</span><del>-        $name = wp_kses($theme-&gt;name, $themes_allowedtags);
-        $author = wp_kses($theme-&gt;author, $themes_allowedtags);
-        $desc = wp_kses($theme-&gt;description, $themes_allowedtags);
-        //if ( strlen($desc) &gt; 30 )
-        //        $desc = substr($desc, 0, 15) . '&lt;span class=&quot;dots&quot;&gt;...&lt;/span&gt;&lt;span&gt;' . substr($desc, -15) . '&lt;/span&gt;';
</del><ins>+        $name   = wp_kses( $theme-&gt;name,   $themes_allowedtags );
+        $author = wp_kses( $theme-&gt;author, $themes_allowedtags );
</ins><span class="cx"> 
</span><del>-        $preview_link = $theme-&gt;preview_url . '?TB_iframe=true&amp;amp;width=600&amp;amp;height=400';
-        if ( !is_array($actions) ) {
-                $actions = array();
-                $actions[] = '&lt;a href=&quot;' . self_admin_url('theme-install.php?tab=theme-information&amp;amp;theme=' . $theme-&gt;slug .
-                                                                                '&amp;amp;TB_iframe=true&amp;amp;tbWidth=500&amp;amp;tbHeight=385') . '&quot; class=&quot;thickbox thickbox-preview onclick&quot; title=&quot;' . esc_attr(sprintf(__('Install &amp;#8220;%s&amp;#8221;'), $name)) . '&quot;&gt;' . __('Install') . '&lt;/a&gt;';
-                if ( !is_network_admin() )
-                        $actions[] = '&lt;a href=&quot;' . $preview_link . '&quot; class=&quot;thickbox thickbox-preview onclick previewlink&quot; title=&quot;' . esc_attr(sprintf(__('Preview &amp;#8220;%s&amp;#8221;'), $name)) . '&quot;&gt;' . __('Preview') . '&lt;/a&gt;';
-                $actions = apply_filters('theme_install_action_links', $actions, $theme);
-        }
</del><ins>+        $num_ratings = sprintf( _n( '(based on %s rating)', '(based on %s ratings)', $theme-&gt;num_ratings ), number_format_i18n( $theme-&gt;num_ratings ) );
</ins><span class="cx"> 
</span><del>-        $actions = implode ( ' | ', $actions );
</del><ins>+        $preview_url   = add_query_arg( 'theme_preview', '1' );
+        $preview_title = sprintf( __('Preview &amp;#8220;%s&amp;#8221;'), $name );
+
+        $install_url = add_query_arg( array(
+                'action' =&gt; 'install-theme',
+                'theme'  =&gt; $theme-&gt;slug,
+        ), self_admin_url( 'update.php' ) );
+
</ins><span class="cx">         ?&gt;
</span><del>-&lt;a class='thickbox thickbox-preview screenshot'
-        href='&lt;?php echo esc_url($preview_link); ?&gt;'
-        title='&lt;?php echo esc_attr(sprintf(__('Preview &amp;#8220;%s&amp;#8221;'), $name)); ?&gt;'&gt;
-&lt;img src='&lt;?php echo esc_url($theme-&gt;screenshot_url); ?&gt;' width='150' /&gt;
-&lt;/a&gt;
-&lt;h3&gt;&lt;?php
-        /* translators: 1: theme name, 2: author name */
-        printf( __( '%1$s &lt;span&gt;by %2$s&lt;/span&gt;' ), $name, $author ); ?&gt;&lt;/h3&gt;
-&lt;span class='action-links'&gt;&lt;?php echo $actions ?&gt;&lt;/span&gt;
-&lt;?php if ( $show_details ) { ?&gt;
-&lt;span class=&quot;separator hide-if-no-js&quot;&gt;| &lt;/span&gt;&lt;a href=&quot;#theme_detail&quot; class=&quot;theme-detail hide-if-no-js&quot; tabindex='4'&gt;&lt;?php _e('Details') ?&gt;&lt;/a&gt;
-&lt;div class=&quot;themedetaildiv hide-if-js&quot;&gt;
-&lt;p&gt;&lt;?php echo $desc ?&gt;&lt;/p&gt;
-&lt;p&gt;&lt;strong&gt;&lt;?php _e('Version:') ?&gt;&lt;/strong&gt; &lt;?php echo wp_kses($theme-&gt;version, $themes_allowedtags) ?&gt;&lt;/p&gt;
-&lt;?php if ( ! empty($theme-&gt;last_updated) ) : ?&gt;
-&lt;p&gt;&lt;strong&gt;&lt;?php _e('Last Updated:') ?&gt;&lt;/strong&gt; &lt;span title=&quot;&lt;?php echo $theme-&gt;last_updated ?&gt;&quot;&gt;&lt;?php printf( __('%s ago'), human_time_diff(strtotime($theme-&gt;last_updated)) ) ?&gt;&lt;/span&gt;&lt;/p&gt;
-&lt;?php endif; if ( ! empty($theme-&gt;requires) ) : ?&gt;
-&lt;p&gt;&lt;strong&gt;&lt;?php _e('Requires WordPress Version:') ?&gt;&lt;/strong&gt; &lt;?php printf(__('%s or higher'), $theme-&gt;requires) ?&gt;&lt;/p&gt;
-&lt;?php endif; if ( ! empty($theme-&gt;tested) ) : ?&gt;
-&lt;p&gt;&lt;strong&gt;&lt;?php _e('Compatible up to:') ?&gt;&lt;/strong&gt; &lt;?php echo $theme-&gt;tested ?&gt;&lt;/p&gt;
-&lt;?php endif; if ( !empty($theme-&gt;downloaded) ) : ?&gt;
-&lt;p&gt;&lt;strong&gt;&lt;?php _e('Downloaded:') ?&gt;&lt;/strong&gt; &lt;?php printf(_n('%s time', '%s times', $theme-&gt;downloaded), number_format_i18n($theme-&gt;downloaded)) ?&gt;&lt;/p&gt;
-&lt;?php endif; ?&gt;
-&lt;div class=&quot;star-holder&quot; title=&quot;&lt;?php printf(_n('(based on %s rating)', '(based on %s ratings)', $theme-&gt;num_ratings), number_format_i18n($theme-&gt;num_ratings)) ?&gt;&quot;&gt;
-        &lt;div class=&quot;star star-rating&quot; style=&quot;width: &lt;?php echo esc_attr($theme-&gt;rating) ?&gt;px&quot;&gt;&lt;/div&gt;
-        &lt;div class=&quot;star star5&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url('images/star.png?v=20110615'); ?&gt;&quot; alt=&quot;&lt;?php esc_attr_e('5 stars') ?&gt;&quot; /&gt;&lt;/div&gt;
-        &lt;div class=&quot;star star4&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url('images/star.png?v=20110615'); ?&gt;&quot; alt=&quot;&lt;?php esc_attr_e('4 stars') ?&gt;&quot; /&gt;&lt;/div&gt;
-        &lt;div class=&quot;star star3&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url('images/star.png?v=20110615'); ?&gt;&quot; alt=&quot;&lt;?php esc_attr_e('3 stars') ?&gt;&quot; /&gt;&lt;/div&gt;
-        &lt;div class=&quot;star star2&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url('images/star.png?v=20110615'); ?&gt;&quot; alt=&quot;&lt;?php esc_attr_e('2 stars') ?&gt;&quot; /&gt;&lt;/div&gt;
-        &lt;div class=&quot;star star1&quot;&gt;&lt;img src=&quot;&lt;?php echo admin_url('images/star.png?v=20110615'); ?&gt;&quot; alt=&quot;&lt;?php esc_attr_e('1 star') ?&gt;&quot; /&gt;&lt;/div&gt;
-&lt;/div&gt;
-&lt;/div&gt;
-&lt;?php }
-        /*
-         object(stdClass)[59]
-         public 'name' =&gt; string 'Magazine Basic' (length=14)
-         public 'slug' =&gt; string 'magazine-basic' (length=14)
-         public 'version' =&gt; string '1.1' (length=3)
-         public 'author' =&gt; string 'tinkerpriest' (length=12)
-         public 'preview_url' =&gt; string 'http://wp-themes.com/?magazine-basic' (length=36)
-         public 'screenshot_url' =&gt; string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' (length=68)
-         public 'rating' =&gt; float 80
-         public 'num_ratings' =&gt; int 1
-         public 'homepage' =&gt; string 'http://wordpress.org/extend/themes/magazine-basic' (length=49)
-         public 'description' =&gt; string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by &lt;a href=&quot;http://bavotasan.com&quot;&gt;c.bavota&lt;/a&gt; of &lt;a href=&quot;http://tinkerpriestmedia.com&quot;&gt;Tinker Priest Media&lt;/a&gt;.' (length=214)
-         public 'download_link' =&gt; string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66)
-         */
</del><ins>+        &lt;a class=&quot;screenshot&quot; href=&quot;&lt;?php echo esc_url( $preview_url ); ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( $preview_title ); ?&gt;&quot;&gt;
+                &lt;img src='&lt;?php echo esc_url( $theme-&gt;screenshot_url ); ?&gt;' width='150' /&gt;
+        &lt;/a&gt;
+
+        &lt;h3&gt;&lt;?php
+                /* translators: 1: theme name, 2: author name */
+                printf( __( '%1$s &lt;span&gt;by %2$s&lt;/span&gt;' ), $name, $author );
+        ?&gt;&lt;/h3&gt;
+
+        &lt;div class=&quot;install-theme-info&quot;&gt;
+                &lt;a class=&quot;theme-install button-primary&quot; href=&quot;&lt;?php echo wp_nonce_url( $install_url, 'install-theme_' . $theme-&gt;slug ); ?&gt;&quot;&gt;&lt;?php _e( 'Install' ); ?&gt;&lt;/a&gt;
+                &lt;h3 class=&quot;theme-name&quot;&gt;&lt;?php echo $name; ?&gt;&lt;/h3&gt;
+                &lt;span class=&quot;theme-by&quot;&gt;&lt;?php printf( __( 'By %s' ), $author ); ?&gt;&lt;/span&gt;
+                &lt;img class=&quot;theme-screenshot&quot; src=&quot;&lt;?php echo esc_url( $theme-&gt;screenshot_url ); ?&gt;&quot; /&gt;
+                &lt;div class=&quot;theme-rating&quot; title=&quot;&lt;?php echo esc_attr( $num_ratings ); ?&gt;&quot;&gt;
+                        &lt;div style=&quot;width:&lt;?php echo esc_attr( intval( $theme-&gt;rating ) . 'px' ); ?&gt;;&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+                &lt;div class=&quot;theme-version&quot;&gt;
+                        &lt;strong&gt;&lt;?php _e('Version:') ?&gt; &lt;/strong&gt;
+                        &lt;?php echo wp_kses( $theme-&gt;version, $themes_allowedtags ); ?&gt;
+                &lt;/div&gt;
+                &lt;div class=&quot;theme-description&quot;&gt;
+                        &lt;?php echo wp_kses( $theme-&gt;description, $themes_allowedtags ); ?&gt;
+                &lt;/div&gt;
+                &lt;input class=&quot;theme-preview-url&quot; type=&quot;hidden&quot; value=&quot;&lt;?php echo esc_url( $theme-&gt;preview_url ); ?&gt;&quot; /&gt;
+        &lt;/div&gt;
+        &lt;?php
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkwpadminjsthemedevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/theme.dev.js (20137 => 20138)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/theme.dev.js        2012-03-07 17:02:22 UTC (rev 20137)
+++ trunk/wp-admin/js/theme.dev.js        2012-03-07 17:35:17 UTC (rev 20138)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+/*
+ * Theme Install
+ *
+ * Displays theme previews on theme install pages.
+ */
+jQuery( function($) {
+        var preview = $('#theme-installer'),
+                info    = preview.find('.install-theme-info'),
+                panel   = preview.find('.wp-full-overlay-main'),
+                body    = $( document.body );
+
+        preview.on( 'click', '.close-full-overlay', function( event ) {
+                preview.fadeOut( 200, function() {
+                        panel.empty();
+                        body.removeClass('theme-installer-active full-overlay-active');
+                });
+                event.preventDefault();
+        });
+
+        preview.on( 'click', '.collapse-sidebar', function( event ) {
+                preview.toggleClass('collapsed');
+                event.preventDefault();
+        });
+
+        $('#availablethemes').on( 'click', '.available-theme', function( event ) {
+                var src;
+
+                info.html( $(this).find('.install-theme-info').html() );
+                src = info.find( '.theme-preview-url' ).val();
+                panel.html( '&lt;iframe src=&quot;' + src + '&quot; /&gt;');
+                preview.fadeIn( 200, function() {
+                        body.addClass('theme-installer-active full-overlay-active');
+                });
+                event.preventDefault();
+        });
+});
+
</ins><span class="cx"> var ThemeViewer;
</span><span class="cx"> 
</span><span class="cx"> (function($){
</span></span></pre>
</div>
</div>

</body>
</html>