<!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>[27559] trunk/src: Restyle the plugin install details modal to match the rest of the admin.</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 { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { 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/27559">27559</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2014-03-16 18:27:38 +0000 (Sun, 16 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Restyle the plugin install details modal to match the rest of the admin. Props avryl and paulwilde for initial mockup, see <a href="http://core.trac.wordpress.org/ticket/26952">#26952</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincsscommoncss">trunk/src/wp-admin/css/common.css</a></li>
<li><a href="#trunksrcwpadminincludesplugininstallphp">trunk/src/wp-admin/includes/plugin-install.php</a></li>
<li><a href="#trunksrcwpadminjsplugininstalljs">trunk/src/wp-admin/js/plugin-install.js</a></li>
<li><a href="#trunksrcwpincludesjsthickboxthickboxcss">trunk/src/wp-includes/js/thickbox/thickbox.css</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincsscommoncss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/css/common.css (27558 => 27559)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/css/common.css        2014-03-15 19:58:52 UTC (rev 27558)
+++ trunk/src/wp-admin/css/common.css   2014-03-16 18:27:38 UTC (rev 27559)
</span><span class="lines">@@ -1788,97 +1788,154 @@
</span><span class="cx">  margin: 6px 0 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* Header on thickbox */
-#plugin-information-header {
-       margin: 0;
-       padding: 0 5px;
</del><ins>+/* Plugin install thickbox */
+#plugin-information {
+       background: #fcfcfc;
+       position: fixed;
+       top: 0;
+       right: 0;
+       bottom: 0;
+       left: 0;
+       height: auto;
+       padding: 0;
+}
+
+#plugin-information-title {
+       padding: 0 36px 0 16px;
+       font-size: 18px;
</ins><span class="cx">   font-weight: 600;
</span><del>-       position: relative;
-       border-bottom: 1px solid #dfdfdf;
-       height: 2.5em;
-       background-color: #f9f9f9;
</del><ins>+        line-height: 36px;
+       top: 0;
+       right: 0;
+       left: 0;
+       height: 36px;
+       border-bottom: 1px solid #ddd;
+       overflow: hidden;
+       text-overflow: ellipsis;
+       white-space: nowrap;
</ins><span class="cx"> }
</span><del>-#plugin-information ul#sidemenu {
-       font-weight: normal;
-       margin: 0 5px;
</del><ins>+
+#plugin-information-tabs {
+       padding: 0 16px;
</ins><span class="cx">   position: absolute;
</span><ins>+       top: 56px;
+       right: 0;
</ins><span class="cx">   left: 0;
</span><del>-       bottom: -1px;
</del><ins>+        height: 36px;
+       z-index: 1;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* Install sidemenu */
-#plugin-information {
-       height: auto;
</del><ins>+#plugin-information-tabs a {
+       position: relative;
+       float: left;
+       padding: 8px 10px 9px;
+       margin: 0;
+       height: 18px;
+       line-height: 18px;
+       font-size: 14px;
+       text-decoration: none;
+       transition: none;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#plugin-information p.action-button {
-       width: 100%;
-       padding-bottom: 0;
-       margin-bottom: 0;
-       margin-top: 10px;
-       -webkit-border-top-left-radius: 3px;
-       border-top-left-radius: 3px;
-       -webkit-border-bottom-left-radius: 3px;
-       border-bottom-left-radius: 3px;
</del><ins>+#plugin-information-tabs a.current {
+       margin: -1px -1px 0;
+       background: #fff;
+       border: 1px solid #ddd;
+       border-bottom: none;
+       color: #333;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#plugin-information .action-button a {
-       background-color: #2ea2cc;
-       color: #fff;
-       text-align: center;
-       font-weight: 600;
-       text-decoration: none;
-       display: block;
-       line-height: 2em;
</del><ins>+#plugin-information-tabs a:active,
+#plugin-information-tabs a:focus {
+       outline: none;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#plugin-information h2 {
-       clear: none !important;
-       margin-right: 200px;
</del><ins>+#plugin-information-content {
+       background: #fff;
+       border-top: 1px solid #ddd;
+       border-bottom: 1px solid #ddd;
+       position: absolute;
+       top: 90px;
+       right: 0;
+       bottom: 44px;
+       left: 0;
+       overflow: auto;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#section-holder {
+       margin: 0;
+       padding: 10px 26px;
+       position: absolute;
+       top: 0;
+       right: 250px;
+       bottom: 0;
+       left: 0;
+}
+
+#section-holder .updated {
+       margin: 16px 0;
+}
+
</ins><span class="cx"> #plugin-information .fyi {
</span><del>-       margin: 0 10px 50px;
-       width: 210px;
</del><ins>+        background: #f3f3f3;
+       border: 1px solid #ddd;
+       border-top: 0;
+       color: #666;
+       padding: 16px;
+       position: absolute;
+       top: 0;
+       right: 0;
+       width: 217px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#plugin-information .fyi strong {
+       color: #464646;
+}
+
+#plugin-information .fyi h3 {
+       font-weight: bold;
+       text-transform: uppercase;
+       font-size: 12px;
+       color: #666;
+       margin: 24px 0 8px;
+}
+
</ins><span class="cx"> #plugin-information .fyi h2 {
</span><span class="cx">  font-size: 0.9em;
</span><span class="cx">  margin-bottom: 0;
</span><span class="cx">  margin-right: 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#plugin-information .fyi h2.mainheader {
-       padding: 5px;
-       -webkit-border-top-left-radius: 3px;
-       border-top-left-radius: 3px;
-       background-color: #cee1ef;
-}
-
</del><span class="cx"> #plugin-information .fyi ul {
</span><del>-       padding: 10px 5px 10px 7px;
</del><ins>+        padding: 0;
</ins><span class="cx">   margin: 0;
</span><span class="cx">  list-style: none;
</span><del>-       -webkit-border-bottom-left-radius: 3px;
-       border-bottom-left-radius: 3px;
-       background-color: #eaf3fa;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #plugin-information .fyi li {
</span><del>-       margin-right: 0;
</del><ins>+        margin: 0 0 10px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#plugin-information #section-holder {
-       padding: 10px;
</del><ins>+#plugin-information-footer {
+       padding: 8px 16px;
+       position: absolute;
+       right: 0;
+       bottom: 0;
+       left: 0;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #plugin-information .section ul,
</span><span class="cx"> #plugin-information .section ol {
</span><del>-       margin-left: 16px;
-       list-style-type: square;
-       list-style-image: none;
</del><ins>+        list-style-type: disc;
+       margin-left: 24px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#plugin-information .section,
+#plugin-information .section p {
+       font-size: 14px;
+       line-height: 1.7;
+}
+
</ins><span class="cx"> #plugin-information #section-screenshots ol {
</span><span class="cx">  list-style: none;
</span><span class="cx">  margin: 0;
</span><span class="lines">@@ -1886,38 +1943,97 @@
</span><span class="cx"> 
</span><span class="cx"> #plugin-information #section-screenshots li img {
</span><span class="cx">  vertical-align: text-top;
</span><ins>+       margin-top: 16px;
</ins><span class="cx">   max-width: 100%;
</span><span class="cx">  width: auto;
</span><span class="cx">  height: auto;
</span><ins>+       -webkit-box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 );
+       box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #plugin-information #section-screenshots li p {
</span><span class="cx">  font-style: italic;
</span><span class="cx">  padding-left: 20px;
</span><del>-       padding-bottom: 2em;
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-#plugin-information #section-screenshots ol,
-#plugin-information .updated,
</del><span class="cx"> #plugin-information pre {
</span><del>-       margin-right: 215px;
-}
-
-#plugin-information pre {
</del><span class="cx">   padding: 7px;
</span><span class="cx">  overflow: auto;
</span><span class="cx">  border: 1px solid #ccc;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#plugin-information pre,
-#plugin-information code {
-       background-color: #ededff;
-}
-
</del><span class="cx"> .plugin-version-author-uri {
</span><span class="cx">  font-size: 13px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+@media screen and ( max-width: 782px ) {
+       #plugin-information-content {
+               overflow: auto;
+               bottom: 62px;
+       }
+
+       #plugin-information .fyi {
+               border: 1px solid #ddd;
+               position: static;
+               width: auto;
+               margin: 26px 26px 16px;
+       }
+
+       #section-holder {
+               position: static;
+       }
+
+       #plugin-information .fyi h3,
+       #plugin-information .fyi small {
+               display: none;
+       }
+
+       #plugin-information-footer {
+               padding: 12px 16px;
+               height: 37px;
+       }
+}
+
+/* Thickbox for Plugin Install screen */
+body.plugin-install-php #TB_window,
+body.index-php #TB_window {
+       background: #fcfcfc url( ../images/spinner.gif ) no-repeat center;
+}
+
+@media print,
+       (-o-min-device-pixel-ratio: 5/4),
+       (-webkit-min-device-pixel-ratio: 1.25),
+       (min-resolution: 120dpi) {
+       
+       body.plugin-install-php #TB_window,
+       body.index-php #TB_window {
+               background: #fcfcfc url( ../images/spinner-2x.gif ) no-repeat center;
+       }
+}
+
+body.plugin-install-php #TB_title,
+body.index-php #TB_title {
+       float: left;
+       height: 1px;
+}
+
+body.plugin-install-php #TB_ajaxWindowTitle,
+body.index-php #TB_ajaxWindowTitle {
+       display: none;
+}
+
+body.plugin-install-php .tb-close-icon,
+body.index-php .tb-close-icon {
+       line-height: 36px;
+       width: 36px;
+       height: 36px;
+}
+
+body.plugin-install-php .tb-close-icon:before,
+body.index-php .tb-close-icon:before {
+       line-height: 36px;
+}
+
</ins><span class="cx"> /* @todo: move this. */
</span><span class="cx"> img {
</span><span class="cx">  border: none;
</span></span></pre></div>
<a id="trunksrcwpadminincludesplugininstallphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/plugin-install.php (27558 => 27559)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/plugin-install.php   2014-03-15 19:58:52 UTC (rev 27558)
+++ trunk/src/wp-admin/includes/plugin-install.php      2014-03-16 18:27:38 UTC (rev 27559)
</span><span class="lines">@@ -312,8 +312,8 @@
</span><span class="cx"> 
</span><span class="cx">  $api = plugins_api( 'plugin_information', array( 'slug' => wp_unslash( $_REQUEST['plugin'] ), 'is_ssl' => is_ssl() ) );
</span><span class="cx"> 
</span><del>-       if ( is_wp_error($api) )
-               wp_die($api);
</del><ins>+        if ( is_wp_error( $api ) )
+               wp_die( $api );
</ins><span class="cx"> 
</span><span class="cx">  $plugins_allowedtags = array(
</span><span class="cx">          'a' => array( 'href' => array(), 'title' => array(), 'target' => array() ),
</span><span class="lines">@@ -334,13 +334,17 @@
</span><span class="cx">  );
</span><span class="cx"> 
</span><span class="cx">  //Sanitize HTML
</span><del>-       foreach ( (array)$api->sections as $section_name => $content )
</del><ins>+        foreach ( (array)$api->sections as $section_name => $content ) {
</ins><span class="cx">           $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags);
</span><ins>+       }
+
</ins><span class="cx">   foreach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) {
</span><span class="cx">          if ( isset( $api->$key ) )
</span><span class="cx">                  $api->$key = wp_kses( $api->$key, $plugins_allowedtags );
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       $_tab = esc_attr( $tab );
+
</ins><span class="cx">   $section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
</span><span class="cx">  if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) {
</span><span class="cx">          $section_titles = array_keys( (array) $api->sections );
</span><span class="lines">@@ -348,8 +352,10 @@
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="cx">  iframe_header( __('Plugin Install') );
</span><del>-       echo "<div id='$tab-header'>\n";
-       echo "<ul id='sidemenu'>\n";
</del><ins>+
+       echo "<div id='{$_tab}-title'>{$api->name}</div>";
+       echo "<div id='{$_tab}-tabs'>\n";
+
</ins><span class="cx">   foreach ( (array)$api->sections as $section_name => $content ) {
</span><span class="cx"> 
</span><span class="cx">          if ( isset( $plugins_section_titles[ $section_name ] ) )
</span><span class="lines">@@ -359,70 +365,48 @@
</span><span class="cx"> 
</span><span class="cx">          $class = ( $section_name == $section ) ? ' class="current"' : '';
</span><span class="cx">          $href = add_query_arg( array('tab' => $tab, 'section' => $section_name) );
</span><del>-               $href = esc_url($href);
</del><ins>+                $href = esc_url( $href );
</ins><span class="cx">           $san_section = esc_attr( $section_name );
</span><del>-               echo "\t<li><a name='$san_section' href='$href' $class>$title</a></li>\n";
</del><ins>+                echo "\t<a name='$san_section' href='$href' $class>$title</a>\n";
</ins><span class="cx">   }
</span><del>-       echo "</ul>\n";
</del><ins>+
</ins><span class="cx">   echo "</div>\n";
</span><ins>+
</ins><span class="cx">   ?>
</span><del>-       <div class="alignright fyi">
-               <?php if ( ! empty($api->download_link) && ( current_user_can('install_plugins') || current_user_can('update_plugins') ) ) : ?>
-               <p class="action-button">
-               <?php
-               $status = install_plugin_install_status($api);
-               switch ( $status['status'] ) {
-                       case 'install':
-                               if ( $status['url'] )
-                                       echo '<a href="' . $status['url'] . '" target="_parent">' . __('Install Now') . '</a>';
-                               break;
-                       case 'update_available':
-                               if ( $status['url'] )
-                                       echo '<a href="' . $status['url'] . '" target="_parent">' . __('Install Update Now') .'</a>';
-                               break;
-                       case 'newer_installed':
-                               echo '<a>' . sprintf(__('Newer Version (%s) Installed'), $status['version']) . '</a>';
-                               break;
-                       case 'latest_installed':
-                               echo '<a>' . __('Latest Version Installed') . '</a>';
-                               break;
-               }
-               ?>
-               </p>
-               <?php endif; ?>
-               <h2 class="mainheader"><?php /* translators: For Your Information */ _e('FYI') ?></h2>
</del><ins>+        <div id="<?php echo $_tab; ?>-content">
+       <div class="fyi">
</ins><span class="cx">           <ul>
</span><del>-<?php if ( ! empty($api->version) ) : ?>
</del><ins>+<?php if ( ! empty( $api->version ) ) : ?>
</ins><span class="cx">                   <li><strong><?php _e('Version:') ?></strong> <?php echo $api->version ?></li>
</span><del>-<?php endif; if ( ! empty($api->author) ) : ?>
</del><ins>+<?php endif; if ( ! empty( $api->author ) ) : ?>
</ins><span class="cx">                   <li><strong><?php _e('Author:') ?></strong> <?php echo links_add_target($api->author, '_blank') ?></li>
</span><del>-<?php endif; if ( ! empty($api->last_updated) ) : ?>
</del><ins>+<?php endif; if ( ! empty( $api->last_updated ) ) : ?>
</ins><span class="cx">                   <li><strong><?php _e('Last Updated:') ?></strong> <span title="<?php echo $api->last_updated ?>"><?php
</span><span class="cx">                                                  printf( __('%s ago'), human_time_diff(strtotime($api->last_updated)) ) ?></span></li>
</span><del>-<?php endif; if ( ! empty($api->requires) ) : ?>
</del><ins>+<?php endif; if ( ! empty( $api->requires ) ) : ?>
</ins><span class="cx">                   <li><strong><?php _e('Requires WordPress Version:') ?></strong> <?php printf(__('%s or higher'), $api->requires) ?></li>
</span><del>-<?php endif; if ( ! empty($api->tested) ) : ?>
</del><ins>+<?php endif; if ( ! empty( $api->tested ) ) : ?>
</ins><span class="cx">                   <li><strong><?php _e('Compatible up to:') ?></strong> <?php echo $api->tested ?></li>
</span><del>-<?php endif; if ( ! empty($api->downloaded) ) : ?>
</del><ins>+<?php endif; if ( ! empty( $api->downloaded ) ) : ?>
</ins><span class="cx">                   <li><strong><?php _e('Downloaded:') ?></strong> <?php printf(_n('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li>
</span><del>-<?php endif; if ( ! empty($api->slug) && empty($api->external) ) : ?>
</del><ins>+<?php endif; if ( ! empty( $api->slug ) && empty( $api->external ) ) : ?>
</ins><span class="cx">                   <li><a target="_blank" href="https://wordpress.org/plugins/<?php echo $api->slug ?>/"><?php _e('WordPress.org Plugin Page &#187;') ?></a></li>
</span><del>-<?php endif; if ( ! empty($api->homepage) ) : ?>
</del><ins>+<?php endif; if ( ! empty( $api->homepage ) ) : ?>
</ins><span class="cx">                   <li><a target="_blank" href="<?php echo $api->homepage ?>"><?php _e('Plugin Homepage &#187;') ?></a></li>
</span><span class="cx"> <?php endif; ?>
</span><span class="cx">          </ul>
</span><del>-               <?php if ( ! empty($api->rating) ) : ?>
-               <h2><?php _e('Average Rating') ?></h2>
</del><ins>+                <?php if ( ! empty( $api->rating ) ) : ?>
+               <h3><?php _e('Average Rating') ?></h3>
</ins><span class="cx">           <?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?>
</span><del>-               <small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small>
</del><ins>+                <small><?php printf( _n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings) ); ?></small>
</ins><span class="cx">           <?php endif; ?>
</span><span class="cx">  </div>
</span><span class="cx">  <div id="section-holder" class="wrap">
</span><span class="cx">  <?php
</span><del>-               if ( !empty($api->tested) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->tested)), $api->tested, '>') )
</del><ins>+                if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) )
</ins><span class="cx">                   echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.') . '</p></div>';
</span><span class="cx"> 
</span><del>-               else if ( !empty($api->requires) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->requires)), $api->requires, '<') )
</del><ins>+                else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) )
</ins><span class="cx">                   echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>';
</span><span class="cx"> 
</span><span class="cx">          foreach ( (array)$api->sections as $section_name => $content ) {
</span><span class="lines">@@ -432,19 +416,40 @@
</span><span class="cx">                  else
</span><span class="cx">                          $title = ucwords( str_replace( '_', ' ', $section_name ) );
</span><span class="cx"> 
</span><del>-                       $content = links_add_base_url($content, 'https://wordpress.org/plugins/' . $api->slug . '/');
-                       $content = links_add_target($content, '_blank');
</del><ins>+                        $content = links_add_base_url( $content, 'https://wordpress.org/plugins/' . $api->slug . '/' );
+                       $content = links_add_target( $content, '_blank' );
</ins><span class="cx"> 
</span><span class="cx">                  $san_section = esc_attr( $section_name );
</span><span class="cx"> 
</span><span class="cx">                  $display = ( $section_name == $section ) ? 'block' : 'none';
</span><span class="cx"> 
</span><span class="cx">                  echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n";
</span><del>-                       echo "\t\t<h2 class='long-header'>$title</h2>";
</del><span class="cx">                   echo $content;
</span><span class="cx">                  echo "\t</div>\n";
</span><span class="cx">          }
</span><span class="cx">  echo "</div>\n";
</span><ins>+       echo "</div>\n";
+       echo "<div id='$tab-footer'>\n";
+       if ( ! empty( $api->download_link ) && ( current_user_can('install_plugins') || current_user_can('update_plugins') ) ) {
+               $status = install_plugin_install_status($api);
+               switch ( $status['status'] ) {
+                       case 'install':
+                               if ( $status['url'] )
+                                       echo '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __('Install Now') . '</a>';
+                               break;
+                       case 'update_available':
+                               if ( $status['url'] )
+                                       echo '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __('Install Update Now') .'</a>';
+                               break;
+                       case 'newer_installed':
+                               echo '<a class="button button-primary right">' . sprintf(__('Newer Version (%s) Installed'), $status['version']) . '</a>';
+                               break;
+                       case 'latest_installed':
+                               echo '<a class="button button-primary right">' . __('Latest Version Installed') . '</a>';
+                               break;
+               }
+       }
+       echo "</div>\n";
</ins><span class="cx"> 
</span><span class="cx">  iframe_footer();
</span><span class="cx">  exit;
</span></span></pre></div>
<a id="trunksrcwpadminjsplugininstalljs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/js/plugin-install.js (27558 => 27559)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/js/plugin-install.js  2014-03-15 19:58:52 UTC (rev 27558)
+++ trunk/src/wp-admin/js/plugin-install.js     2014-03-16 18:27:38 UTC (rev 27559)
</span><span class="lines">@@ -2,37 +2,41 @@
</span><span class="cx"> 
</span><span class="cx"> /* Plugin Browser Thickbox related JS*/
</span><span class="cx"> var tb_position;
</span><del>-jQuery(document).ready(function($) {
</del><ins>+jQuery( document ).ready( function( $ ) {
</ins><span class="cx">   tb_position = function() {
</span><del>-               var tbWindow = $('#TB_window'),
-                       width = $(window).width(),
-                       H = $(window).height(),
-                       W = ( 720 < width ) ? 720 : width,
-                       adminbar_height = 0;
</del><ins>+                var tbWindow = $( '#TB_window' ),
+                       width = $( window ).width(),
+                       H = $( window ).height() - ( ( 850 < width ) ? 60 : 20 ),
+                       W = ( 850 < width ) ? 830 : width - 20;
</ins><span class="cx"> 
</span><del>-               if ( $('#wpadminbar').length ) {
-                       adminbar_height = parseInt( $('#wpadminbar').css('height'), 10 );
-               }
-
</del><span class="cx">           if ( tbWindow.size() ) {
</span><del>-                       tbWindow.width( W - 50 ).height( H - 45 - adminbar_height );
-                       $('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height );
-                       tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'});
-                       if ( typeof document.body.style.maxWidth !== 'undefined' )
-                               tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'});
</del><ins>+                        tbWindow.width( W ).height( H );
+                       $( '#TB_iframeContent' ).width( W ).height( H );
+                       tbWindow.css({
+                               'margin-left': '-' + parseInt( ( W / 2 ), 10 ) + 'px'
+                       });
+                       if ( typeof document.body.style.maxWidth !== 'undefined' ) {
+                               tbWindow.css({
+                                       'top': ( ( 850 < width ) ? 30 : 10 ) + 'px',
+                                       'margin-top': '0'
+                               });
+                       }
</ins><span class="cx">           }
</span><span class="cx"> 
</span><del>-               return $('a.thickbox').each( function() {
-                       var href = $(this).attr('href');
-                       if ( ! href )
</del><ins>+                return $( 'a.thickbox' ).each( function() {
+                       var href = $( this ).attr( 'href' );
+                       if ( ! href ) {
</ins><span class="cx">                           return;
</span><del>-                       href = href.replace(/&width=[0-9]+/g, '');
-                       href = href.replace(/&height=[0-9]+/g, '');
-                       $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 - adminbar_height ) );
</del><ins>+                        }
+                       href = href.replace( /&width=[0-9]+/g, '' );
+                       href = href.replace( /&height=[0-9]+/g, '' );
+                       $(this).attr( 'href', href + '&width=' + W + '&height=' + ( H ) );
</ins><span class="cx">           });
</span><span class="cx">  };
</span><span class="cx"> 
</span><del>-       $(window).resize(function(){ tb_position(); });
</del><ins>+        $( window ).resize( function() {
+               tb_position();
+       });
</ins><span class="cx"> 
</span><span class="cx">  $('.plugins').on( 'click', 'a.thickbox', function() {
</span><span class="cx">          tb_click.call(this);
</span><span class="lines">@@ -43,18 +47,18 @@
</span><span class="cx">  });
</span><span class="cx"> 
</span><span class="cx">  /* Plugin install related JS*/
</span><del>-       $('#plugin-information #sidemenu a').click( function() {
-               var tab = $(this).attr('name');
</del><ins>+        $( '#plugin-information-tabs a' ).click( function( event ) {
+               var tab = $( this ).attr( 'name' );
+               event.preventDefault();
</ins><span class="cx">           //Flip the tab
</span><del>-               $('#plugin-information-header a.current').removeClass('current');
-               $(this).addClass('current');
</del><ins>+                $( '#plugin-information-tabs a.current' ).removeClass( 'current' );
+               $( this ).addClass( 'current' );
</ins><span class="cx">           //Flip the content.
</span><del>-               $('#section-holder div.section').hide(); //Hide 'em all
-               $('#section-' + tab).show();
-               return false;
</del><ins>+                $( '#section-holder div.section' ).hide(); //Hide 'em all
+               $( '#section-' + tab ).show();
</ins><span class="cx">   });
</span><span class="cx"> 
</span><del>-       $('a.install-now').click( function() {
</del><ins>+        $( 'a.install-now' ).click( function() {
</ins><span class="cx">           return confirm( plugininstallL10n.ays );
</span><span class="cx">  });
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunksrcwpincludesjsthickboxthickboxcss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/thickbox/thickbox.css (27558 => 27559)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/thickbox/thickbox.css   2014-03-15 19:58:52 UTC (rev 27558)
+++ trunk/src/wp-includes/js/thickbox/thickbox.css      2014-03-16 18:27:38 UTC (rev 27559)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">  overflow: hidden; 
</span><span class="cx">  padding: 0 29px 0 10px;
</span><span class="cx">  text-overflow: ellipsis;
</span><del>-       white-space: nowrap; 
</del><ins>+        white-space: nowrap;
</ins><span class="cx">   width: calc( 100% - 39px );
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>