<!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>[23506] trunk: Revisions: First pass an implementing a new UI/UX for reviewing the revisions of posts.</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/23506">23506</a></dd>
<dt>Author</dt> <dd>westi</dd>
<dt>Date</dt> <dd>2013-02-28 15:14:34 +0000 (Thu, 28 Feb 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Revisions: First pass an implementing a new UI/UX for reviewing the revisions of posts. See <a href="http://core.trac.wordpress.org/ticket/23497">#23497</a> props adamsilverstein for the initial patch.

This implements a new revisions ui using Backbone and preserves all the old methods of &quot;integration&quot; so the change should be transparent to plugins using revisi
ons with CPTs.

This is the first pass and so there are a number of things still to be resolved, more details in the ticket. Feedback welcomed.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminajaxphp">trunk/wp-admin/admin-ajax.php</a></li>
<li><a href="#trunkwpadmincsscolorsfreshcss">trunk/wp-admin/css/colors-fresh.css</a></li>
<li><a href="#trunkwpadmincsswpadmincss">trunk/wp-admin/css/wp-admin.css</a></li>
<li><a href="#trunkwpadmineditformadvancedphp">trunk/wp-admin/edit-form-advanced.php</a></li>
<li><a href="#trunkwpadminincludesajaxactionsphp">trunk/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunkwpadminrevisionphp">trunk/wp-admin/revision.php</a></li>
<li><a href="#trunkwpincludespluggablephp">trunk/wp-includes/pluggable.php</a></li>
<li><a href="#trunkwpincludesposttemplatephp">trunk/wp-includes/post-template.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
<li><a href="#trunkwpincludeswpdiffphp">trunk/wp-includes/wp-diff.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkwpadmincssrevisionscss">trunk/wp-admin/css/revisions.css</a></li>
<li><a href="#trunkwpadmincssrevisionsmincss">trunk/wp-admin/css/revisions.min.css</a></li>
<li><a href="#trunkwpadminjsrevisionsjs">trunk/wp-admin/js/revisions.js</a></li>
<li><a href="#trunkwpadminjsrevisionsminjs">trunk/wp-admin/js/revisions.min.js</a></li>
<li><a href="#trunkwpincludescssjqueryuislidercss">trunk/wp-includes/css/jquery-ui-slider.css</a></li>
<li><a href="#trunkwpincludescssjqueryuislidermincss">trunk/wp-includes/css/jquery-ui-slider.min.css</a></li>
<li><a href="#trunkwpincludesjstemplatejs">trunk/wp-includes/js/template.js</a></li>
<li><a href="#trunkwpincludesjstemplateminjs">trunk/wp-includes/js/template.min.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminadminajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-ajax.php (23505 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-ajax.php        2013-02-28 09:03:10 UTC (rev 23505)
+++ trunk/wp-admin/admin-ajax.php        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> 
</span><span class="cx"> $core_actions_get = array(
</span><span class="cx">         'fetch-list', 'ajax-tag-search', 'wp-compression-test', 'imgedit-preview', 'oembed-cache',
</span><del>-        'autocomplete-user', 'dashboard-widgets', 'logged-in',
</del><ins>+        'autocomplete-user', 'dashboard-widgets', 'logged-in', 'revisions-data'
</ins><span class="cx"> );
</span><span class="cx"> 
</span><span class="cx"> $core_actions_post = array(
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">         'save-widget', 'set-post-thumbnail', 'date_format', 'time_format', 'wp-fullscreen-save-post',
</span><span class="cx">         'wp-remove-post-lock', 'dismiss-wp-pointer', 'upload-attachment', 'get-attachment',
</span><span class="cx">         'query-attachments', 'save-attachment', 'save-attachment-compat', 'send-link-to-editor',
</span><del>-        'send-attachment-to-editor', 'save-attachment-order', 'heartbeat',
</del><ins>+        'send-attachment-to-editor', 'save-attachment-order', 'heartbeat'
</ins><span class="cx"> );
</span><span class="cx"> 
</span><span class="cx"> // Register core Ajax calls.
</span></span></pre></div>
<a id="trunkwpadmincsscolorsfreshcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/colors-fresh.css (23505 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/colors-fresh.css        2013-02-28 09:03:10 UTC (rev 23505)
+++ trunk/wp-admin/css/colors-fresh.css        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -1351,17 +1351,28 @@
</span><span class="cx"> 
</span><span class="cx"> /* Diff */
</span><span class="cx"> table.diff .diff-deletedline {
</span><del>-        background-color: #fdd;
</del><ins>+        background-color: #ffe5e6;
+        color: #f2001f;
+        text-decoration: line-through;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> table.diff .diff-deletedline del {
</span><span class="cx">         background-color: #f99;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+table.diff .diff-deletedline-symbol {
+        color: #f2001f;
+}
+
</ins><span class="cx"> table.diff .diff-addedline {
</span><del>-        background-color: #dfd;
</del><ins>+        background-color: #e9f6ea;
+        color: #00a500;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+table.diff .diff-addedline-symbol {
+        color: #00a500;
+}
+
</ins><span class="cx"> table.diff .diff-addedline ins {
</span><span class="cx">         background-color: #9f9;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadmincssrevisionscss"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/css/revisions.css (0 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/revisions.css                                (rev 0)
+++ trunk/wp-admin/css/revisions.css        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -0,0 +1,213 @@
</span><ins>+/* Styles for the revision screen */
+
+.revisiondiffcontainer {
+        width: 96%;
+}
+
+.revisiondiffcontainer input.button {
+        margin: 2px;
+}
+
+#diffrestore, #diffnext, #diffcancel {
+        float: right;
+        margin-right: 5px;
+}
+
+#diffprevious, #difftitle, #difftitlefrom, #diff_from_current_revision {
+        float: left;
+        margin-left: 5px;
+        height: 35px;
+}
+
+#diffprevious, #diffnext {
+        margin-top: 7px;
+        height: 30px;
+}
+
+#diffheader, #diffsubheader {
+        clear: both;
+        width: 100%;
+}
+
+#diffheader {
+        border-bottom: 2px solid #999;
+        width: 100%;
+        height: 45px;
+        line-height: 45px;
+        padding-top: 10px;
+}
+
+#diffsubheader {
+        background-color: #eee;
+        border-bottom: 2px solid #999;
+        width: 100%;
+        height:35px;
+        line-height: 35px;
+}
+
+#diffslider {
+        width: 70%;
+        margin-left: auto;
+        margin-right: auto;
+        text-align: center;
+        height: 3.5em;
+
+}
+
+#revisioncount {
+        width: 50%;
+        margin-left: auto;
+        margin-right: auto;
+        margin-top: 0;
+        line-height: 1em;
+        height: 1em;
+        text-align: center;
+        clear: none;
+        padding: 5px;
+}
+
+.revisiondiffcontainer {
+        margin-top: 10px;
+}
+
+#diffsliderwrap {
+        width: 80%;
+        margin-left: auto;
+        margin-right: auto;
+}
+
+#diffsliderwrap #sliderinner {
+        position: relative;
+        top: 47px;
+}
+
+#removedandadded {
+        width: 100%
+        padding-bottom: 30px;
+        padding-top: 3px;
+        font-size: 16px;
+}
+
+#removed, #added {
+        width: auto;
+        text-align: left;
+        padding-left: 5px;
+        padding-right: 5px;
+        padding-top: 5px;
+        padding-bottom: 5px;
+        float: left;
+}
+
+.diffsplit #added {
+        float: right;
+        width: 47%;
+        text-align: left;
+}
+
+.diffsplit #removedandadded {
+        width: 100%;
+}
+
+#added {
+         padding-left: 10px;
+}
+
+#removed {
+         padding-left: 0px;
+ }
+
+#removed {
+        color: #d2281f;
+}
+
+#added {
+        color: #00a100;
+}
+
+#comparetworevisions {
+        float: right;
+        line-height: 35px;
+        padding-right: 5px;
+}
+
+#comparetworevisions input{
+        margin-right: 2px;
+}
+
+#difftitle img, #difftitlefrom img {
+        vertical-align: middle;
+        margin-left: 5px;
+}
+
+#showsplitviewoption, #toggleshowautosavesoption {
+        float: right;
+        padding-left: 10px;
+        padding-right: 10px;
+}
+
+#revisionoptions {
+        margin-top: 0px;
+        line-height: 40px;
+        clear: both;
+        width: 100%;
+}
+
+.comparetwo #diffprevious, .comparetwo #diffnext {
+        display: none;
+}
+
+.comparetwo #diffslider {
+        width: 95%;
+}
+
+.currentversion span#diff_left_current_revision {
+        display: inline;
+}
+
+span#diff_left_current_revision, span#diff_from_current_revision {
+        display: none;
+}
+
+span#diff_left_count, span#diff_left_count_inner {
+        display: inline;
+}
+
+.currentversion span#diff_left_count,
+.currentversion span#diff_left_count_inner,
+.currentversion #difftitlefrom {
+        display: none;
+}
+
+#difftitlefrom {
+        float: left;
+        display: none;
+}
+
+.comparetwo #difftitlefrom, .comparetwo.currentversion span#diff_from_current_revision {
+        display: inline;
+}
+.comparetwo.currentversion #difftitlefrom {
+        display: none;
+}
+
+#modelsloading {
+        float: right;
+        line-height: 30px;
+        display: none;
+        clear: none;
+        margin: 0;
+        margin-top: -40px;
+}
+
+#modelsloading .spinner {
+         float: left;
+ }
+
+.leftmodelloading #modelsloading,
+.rightmodelloading #modelsloading,
+.leftmodelloading #modelsloading .spinner,
+.rightmodelloading #modelsloading .spinner {
+        display: inline;
+}
+

</ins></span></pre></div>
<a id="trunkwpadmincsswpadmincss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/wp-admin.css (23505 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/wp-admin.css        2013-02-28 09:03:10 UTC (rev 23505)
+++ trunk/wp-admin/css/wp-admin.css        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -3504,9 +3504,21 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> table.diff col.content {
</span><del>-        width: 50%;
</del><ins>+        width: auto;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+table.diff col.content.diffsplit {
+        width: 48%;
+}
+
+table.diff col.diffsplit.middle {
+        width: 4%;
+}
+
+table.diff col.ltype {
+        width: 30px;
+}
+
</ins><span class="cx"> table.diff tr {
</span><span class="cx">         background-color: transparent;
</span><span class="cx"> }
</span><span class="lines">@@ -8808,3 +8820,17 @@
</span><span class="cx"> .locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap {
</span><span class="cx">         margin-left: 8em;
</span><span class="cx"> }
</span><ins>+
+#revisions-meta-mostrecent, 
+#revisions-meta-stored,
+#revisions-meta-oldest,
+#revisions-meta-link {
+        line-height: 30px;
+        height: 30px;
+        vertical-align: middle;
+        padding-right: 10px;
+}
+#revisions-meta-mostrecent img, 
+#revisions-meta-oldest img {
+vertical-align: middle;
+}
</ins></span></pre></div>
<a id="trunkwpadmineditformadvancedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-form-advanced.php (23505 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-form-advanced.php        2013-02-28 09:03:10 UTC (rev 23505)
+++ trunk/wp-admin/edit-form-advanced.php        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -168,7 +168,8 @@
</span><span class="cx">                 add_meta_box('authordiv', __('Author'), 'post_author_meta_box', null, 'normal', 'core');
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-if ( post_type_supports($post_type, 'revisions') &amp;&amp; 0 &lt; $post_ID &amp;&amp; wp_get_post_revisions( $post_ID ) )
</del><ins>+// TODO review this count() - why do we need to add it?
+if ( post_type_supports($post_type, 'revisions') &amp;&amp; 0 &lt; $post_ID &amp;&amp; count ( wp_get_post_revisions( $post_ID ) ) &gt; 1  )
</ins><span class="cx">         add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core');
</span><span class="cx"> 
</span><span class="cx"> do_action('add_meta_boxes', $post_type, $post);
</span></span></pre></div>
<a id="trunkwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ajax-actions.php (23505 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ajax-actions.php        2013-02-28 09:03:10 UTC (rev 23505)
+++ trunk/wp-admin/includes/ajax-actions.php        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -1379,7 +1379,7 @@
</span><span class="cx">         global $wp_list_table;
</span><span class="cx"> 
</span><span class="cx">         check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' );
</span><del>-        
</del><ins>+
</ins><span class="cx">         $post_data = wp_unslash( $_POST );
</span><span class="cx"> 
</span><span class="cx">         $taxonomy = sanitize_key( $post_data['taxonomy'] );
</span><span class="lines">@@ -2134,3 +2134,138 @@
</span><span class="cx">         wp_send_json($response);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function wp_ajax_revisions_data() {
+        check_ajax_referer( 'revisions-ajax-nonce', 'nonce' );
+
+        $compareto = isset( $_GET['compareto'] ) ? absint( $_GET['compareto'] ) : 0;
+        $showautosaves = isset( $_GET['showautosaves'] ) ? $_GET['showautosaves'] : '';
+        $show_split_view = isset( $_GET['show_split_view'] ) ? $_GET['show_split_view'] : '';
+        $postid = isset( $_GET['postid'] ) ? absint( $_GET['postid'] ) : '';
+
+        $comparetwomode = ( '' == $postid ) ? false : true;
+        //
+        //TODO: currently code returns all possible comparisons for the indicated 'compareto' revision
+        //however, the front end prevents users from pulling the right handle past the left or the left pass the right,
+        //so only the possible diffs need be generated
+        //
+        $alltherevisions = array();
+
+        if ( '' == $postid )
+                $postid = $compareto;
+
+        if ( ! current_user_can( 'read_post', $postid ) )
+                continue;
+
+        if ( ! $revisions = wp_get_post_revisions( $postid ) )
+                return;
+
+        //if we are comparing two revisions, the first 'revision' represented by the leftmost
+        //slider position is the current revision, prepend a comparison to this revision
+        if ( $comparetwomode )
+                array_unshift( $revisions, get_post( $postid ) );
+
+        $count = 1;
+        foreach ( $revisions as $revision ) :
+        if ( 'true' != $showautosaves &amp;&amp; wp_is_post_autosave( $revision ) )
+                        continue;
+
+        $revision_from_date_author = '';
+
+
+        $left_revision = get_post( $compareto );
+        $right_revision = get_post( $revision );
+
+        $author = get_the_author_meta( 'display_name', $revision-&gt;post_author );
+        /* translators: revision date format, see http://php.net/date */
+        $datef = _x( 'j F, Y @ G:i:s', 'revision date format');
+
+        $gravatar = get_avatar( $revision-&gt;post_author, 18 );
+
+        $date = date_i18n( $datef, strtotime( $revision-&gt;post_modified ) );
+        $revision_date_author = sprintf(
+                '%s %s, %s %s (%s)',
+                $gravatar,
+                $author,
+                human_time_diff( strtotime( $revision-&gt;post_modified ), current_time( 'timestamp' ) ),
+                __( ' ago ' ),
+                $date
+        );
+
+        if ( $comparetwomode ) {
+                $compareto_gravatar = get_avatar( $left_revision-&gt;post_author, 18 );
+                $compareto_author = get_the_author_meta( 'display_name', $left_revision-&gt;post_author );
+                $compareto_date = date_i18n( $datef, strtotime( $left_revision-&gt;post_modified ) );
+
+                $revision_from_date_author = sprintf(
+                        '%s %s, %s %s (%s)',
+                        $compareto_gravatar,
+                        $compareto_author,
+                        human_time_diff( strtotime( $left_revision-&gt;post_modified ), current_time( 'timestamp' ) ),
+                        __( ' ago ' ),
+                        $compareto_date
+                );
+        }
+
+        $restoreaction = wp_nonce_url(
+                add_query_arg(
+                        array( 'revision' =&gt; $revision-&gt;ID, 
+                                'action' =&gt; 'restore' ),
+                                '/wp-admin/revision.php'
+                ),
+                &quot;restore-post_{$compareto}|{$revision-&gt;ID}&quot;
+        );
+
+        //
+        //make sure the left revision is the most recent
+        //
+        if ( strtotime( $right_revision-&gt;post_modified_gmt ) &lt; strtotime( $left_revision-&gt;post_modified_gmt ) ) {
+                $temp = $left_revision;
+                $left_revision = $right_revision;
+                $right_revision = $temp;
+        }
+
+        //
+        //compare from left to right, passed from application
+        //
+        $content='';
+        foreach ( array_keys( _wp_post_revision_fields() ) as $field ) {
+                $left_content = apply_filters( &quot;_wp_post_revision_field_$field&quot;, $left_revision-&gt;$field, $field, $left_revision, 'left' );
+                $right_content = apply_filters( &quot;_wp_post_revision_field_$field&quot;, $right_revision-&gt;$field, $field, $right_revision, 'right' );
+
+                add_filter( &quot;_wp_post_revision_field_$field&quot;, 'wp_kses_post' );
+
+                $args = array();
+
+                if ( 'true' == $show_split_view )
+                         $args = array( 'show_split_view' =&gt; 'true' );
+
+                $content .= wp_text_diff( $left_content, $right_content, $args );
+        }
+
+        //if we are comparing two revisions
+        //and we are on the matching revision
+        //add an error revision indicating unable to compare to self
+        if ( $comparetwomode &amp;&amp; $compareto == $revision-&gt;ID )
+                $alltherevisions[] = array (
+                        'ID' =&gt; $revision-&gt;ID,
+                        'revision_date_author' =&gt; $revision_date_author,
+                        'revisiondiff' =&gt; sprintf('&lt;div id=&quot;selfcomparisonerror&quot;&gt;%s&lt;/div&gt;', __( 'Cannot compare revision to itself' ) ),
+                        'restoreaction' =&gt; urldecode( $restoreaction ),
+                        'revision_from_date_author' =&gt; ''
+                );
+
+        //add to the return data only if there is a difference
+        if ( '' != $content )
+                $alltherevisions[] = array (
+                        'ID' =&gt; $revision-&gt;ID,
+                        'revision_date_author' =&gt; $revision_date_author,
+                        'revisiondiff' =&gt; $content,
+                        'restoreaction' =&gt; urldecode( $restoreaction ),
+                        'revision_from_date_author' =&gt; $revision_from_date_author
+                );
+
+        endforeach;
+
+        echo json_encode( $alltherevisions );
+        exit();
+}
</ins></span></pre></div>
<a id="trunkwpadminjsrevisionsjs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/revisions.js (0 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/revisions.js                                (rev 0)
+++ trunk/wp-admin/js/revisions.js        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -0,0 +1,530 @@
</span><ins>+window.wp = window.wp || {};
+
+(function($) {
+        wp.revisions = {
+
+                views : {},
+
+                Model : Backbone.Model.extend({
+                        defaults: {
+                                ID : 0,
+                                revision_date_author : '',
+                                revisiondiff : '',
+                                restoreaction: '',
+                                diff_max : 0,
+                                diff_count : 0,
+                                diff_revision_to : 0,
+                                revision_from_date_author : '',
+                        }
+                }),
+
+                app: _.extend({}, Backbone.Events),
+
+                App : Backbone.Router.extend({
+                        _revisionDifflView : null,
+                        _revisions : null,
+                        _left_handle_revisions : null,
+                        _right_handle_revisions : null,
+                        _revisionsInteractions : null,
+                        _revisionsOptions : null,
+                        _left_diff : 0,
+                        _right_diff : 1,
+                        _autosaves : false,
+                        _showsplitview : true,
+                        _compareoneortwo : 1,
+                        left_model_loading : false,                //keep track of model loads
+                        right_model_loading : false,        //disallow slider interaction, also repeat loads, while loading
+
+                        //TODO add ability to arrive on specific revision
+                        routes : {
+                                &quot;viewrevision/:revision&quot;: &quot;viewrevision&quot;,
+                        },
+
+                        viewrevision : function( revision ) {
+                                //coming soon
+                        },
+
+                        start_left_model_loading : function() {
+                                this.left_model_loading = true;
+                                $('.revisiondiffcontainer').addClass('leftmodelloading');
+                        },
+
+                        stop_left_model_loading : function() {
+                                this.left_model_loading = false;
+                                $('.revisiondiffcontainer').removeClass('leftmodelloading');
+                        },
+
+                        start_right_model_loading : function() {
+                                this.right_model_loading = true;
+                                $('.revisiondiffcontainer').addClass('rightmodelloading');
+                        },
+
+                        stop_right_model_loading : function() {
+                                this.right_model_loading = false;
+                                $('.revisiondiffcontainer').removeClass('rightmodelloading');
+                        },
+
+                        reloadmodel : function() {
+                                if ( 2 == this._compareoneortwo ) {
+                                        this.reloadleftright();
+                                } else {
+                                        this.reloadmodelsingle();
+                                }
+                        },
+
+                        reloadmodelsingle : function() {
+                                var self = this;
+                                self._revisions.url = ajaxurl +        '?action=revisions-data&amp;compareto=' + wpRevisionsSettings.post_id +
+                                                                                        '&amp;showautosaves=' + self.self_autosaves +
+                                                                                        '&amp;showsplitview=' +  REVAPP._showsplitview +
+                                                                                        '&amp;nonce=' + wpRevisionsSettings.nonce;
+                                self.start_right_model_loading();
+                                this._revisions.fetch({ //reload revision data
+                                        success : function() {
+                                                self.stop_right_model_loading();
+                                                var revisioncount = self._revisions.length;
+                                                if ( self._right_diff &gt; revisioncount ) //if right handle past rightmost, move
+                                                        self._right_diff = revisioncount;
+                                                //TODO add a test for matchind left revision and push left, testing
+                                                //also reset the slider values here
+
+                                                self._revisionView.render();
+                                                $( '#slider' ).slider( 'option', 'max', revisioncount-1 ); //TODO test this
+                                        },
+
+                                        error : function () {
+                                                self.stop_right_model_loading();
+                                                window.console &amp;&amp; console.log( 'Error loading revision data' );
+                                        }
+
+                                });
+                        },
+
+                        reloadleftright : function() {
+                                var self = this;
+                                self.start_left_model_loading();
+                                self.start_right_model_loading();
+
+                                self._left_handle_revisions = new wp.revisions.Collection();
+                                self._right_handle_revisions = new wp.revisions.Collection();
+
+                                if ( 0 == self._left_diff ) {
+                                        self._right_handle_revisions.url =
+                                                ajaxurl +
+                                                '?action=revisions-data&amp;compareto=' + wpRevisionsSettings.post_id +
+                                                '&amp;wpRevisionsSettings.post_id=' + wpRevisionsSettings.post_id +
+                                                '&amp;showautosaves=' + self._autosaves +
+                                                '&amp;showsplitview=' +  self._showsplitview +
+                                                '&amp;nonce=' + wpRevisionsSettings.nonce;
+                                } else {
+                                        self._right_handle_revisions.url =
+                                                ajaxurl +
+                                                '?action=revisions-data&amp;compareto=' + self._revisions.at( self._left_diff - 1 ).get( 'ID' ) +
+                                                '&amp;wpRevisionsSettings.post_id=' + wpRevisionsSettings.post_id +
+                                                '&amp;showautosaves=' + self._autosaves +
+                                                '&amp;showsplitview=' +  self._showsplitview +
+                                                '&amp;nonce=' + wpRevisionsSettings.nonce;
+                                }
+
+                                self._left_handle_revisions.url =
+                                        ajaxurl +
+                                        '?action=revisions-data&amp;compareto=' + self._revisions.at( self._right_diff - 1 ).get( 'ID' ) +
+                                        '&amp;wpRevisionsSettings.post_id=' + wpRevisionsSettings.post_id +
+                                        '&amp;showautosaves=' + self._autosaves +
+                                        '&amp;showsplitview=' +  self._showsplitview +
+                                        '&amp;nonce=' + wpRevisionsSettings.nonce;
+
+                                self._left_handle_revisions.fetch({
+
+                                        xhr: function() {
+                                                var xhr = $.ajaxSettings.xhr();
+                                                xhr.onprogress = self.handleProgress;
+                                                return xhr;
+                                        },
+
+                                        handleProgress: function(evt){
+                                                var percentComplete = 0;
+                                                if (evt.lengthComputable) {
+                                                        percentComplete = evt.loaded / evt.total;
+                                                        window.console &amp;&amp; console.log( Math.round( percentComplete * 100) + &quot;%&quot; );
+                                                }
+                                        },
+
+                                        success : function(){
+                                                self.stop_left_model_loading();
+                                        },
+
+                                        error : function () {
+                                                window.console &amp;&amp; console.log( 'Error loading revision data' );
+                                                self.stop_left_model_loading();
+                                        }
+                                });
+
+                                self._right_handle_revisions.fetch({
+                                        
+                                        success : function(){
+                                                self.stop_right_model_loading();
+                                        },
+
+                                        error : function () {
+                                                window.console &amp;&amp; console.log( 'Error loading revision data' );
+                                                self.stop_right_model_loading();
+                                        }
+                                });
+                        },
+
+                        /*
+                         * initialize the revision appl;ication
+                         */
+                        initialize : function( options ) {
+                                var self = this; //store the application instance
+                                if (this._revisions === null) {
+                                        self._autosaves = '';
+                                        self._revisions = new wp.revisions.Collection(); //set up collection
+                                        self.start_right_model_loading();
+                                        self._revisions.fetch({ //load revision data
+
+                                                success : function() {
+                                                        self.stop_right_model_loading();
+                                                        self.revisionDiffSetup();
+                                                }
+                                        });
+                                }
+                                return this;
+                        },
+
+                        revisionDiffSetup : function() {
+                                var self = this, slider;
+
+                                this._revisionView = new wp.revisions.views.View({
+                                        model : this._revisions
+                                });
+                                this._revisionView.render();
+
+                                this._revisionsInteractions = new wp.revisions.views.Interact({
+                                        model : this._revisions
+                                });
+                                this._revisionsInteractions.render();
+
+                                this._revisionsOptions = new wp.revisions.views.Options({
+                                        model : this._revisions
+                                });
+                                this._revisionsOptions.render();
+
+                        }
+                })
+        };
+
+        wp.revisions.Collection = Backbone.Collection.extend({
+                model : wp.revisions.Model,
+                url : ajaxurl +        '?action=revisions-data&amp;compareto=' + wpRevisionsSettings.post_id + '&amp;showautosaves=false&amp;showsplitview=true&amp;nonce=' + wpRevisionsSettings.nonce
+        });
+
+        _.extend(wp.revisions.views, {
+                //
+                //primary revision diff view
+                //
+                View : Backbone.View.extend({
+                        el : $('#backbonerevisionsdiff')[0],
+                        tagName : 'revisionvview',
+                        className : 'revisionview-container',
+                        template : wp.template('revision'),
+                        revvapp : null,
+                        comparetwochecked : '',
+                        draggingleft : false,
+
+                        initialize : function(){
+                        },
+
+                        //
+                        //render the revisions
+                        //
+                        render : function() {
+                                var addhtml = '';
+                                //compare two revisions mode?
+                                if ( 2 == REVAPP._compareoneortwo ) {
+                                        this.comparetwochecked = 'checked';
+                                        if ( this.draggingleft ) {
+                                                        if ( this.model.at( REVAPP._left_diff ) ) {
+                                                        addhtml = this.template( _.extend(
+                                                                this.model.at( REVAPP._left_diff ).toJSON(),
+                                                                { comparetwochecked : this.comparetwochecked } //keep the checkmark checked
+                                                        ) );
+                                                }
+                                        } else { //dragging right handle
+                                                var thediff = REVAPP._right_diff;
+                                                if ( this.model.at( thediff ) ) {
+                                                        addhtml = this.template( _.extend(
+                                                                this.model.at( thediff ).toJSON(),
+                                                                { comparetwochecked : this.comparetwochecked } //keep the checkmark checked
+                                                        ) );
+                                                }
+                                        }
+                                } else { //end compare two revisions mode, eg only one slider handel
+                                        this.comparetwochecked = '';
+                                        if ( this.model.at( REVAPP._right_diff - 1 ) ) {
+                                                addhtml = this.template( _.extend(
+                                                        this.model.at( REVAPP._right_diff-1 ).toJSON(),
+                                                        { comparetwochecked : this.comparetwochecked } //keep the checkmark checked
+                                                ) );
+                                        }
+                                }
+                                this.$el.html( addhtml );
+                                return this;
+                        },
+
+                        //the compare two button is in this view, add the interaction here
+                        events : {
+                                'click #comparetwo' : 'clickcomparetwo'
+                        },
+
+                        //
+                        //turn on/off the compare two mmode
+                        //
+                        clickcomparetwo : function(){
+                                self = this;
+                                if ( $( 'input#comparetwo' ).is( ':checked' ) ) {
+                                        REVAPP._compareoneortwo = 2 ;
+                                        REVAPP.reloadleftright();
+                                } else {
+                                        REVAPP._compareoneortwo = 1 ;
+                                        REVAPP._revisionView.draggingleft = false;
+                                        REVAPP._left_diff = 0;
+                                        REVAPP.reloadmodelsingle();
+                                }
+                                REVAPP._revisionsInteractions.render();
+                        }
+                }),
+
+                //
+                //options view for show autosaves and show split view options
+                //
+                Options : Backbone.View.extend({
+                        el : $('#backbonerevisionsoptions')[0],
+                        tagName : 'revisionoptionsview',
+                        className : 'revisionoptions-container',
+                        template : wp.template('revisionoptions'),
+
+                        initialize : function() {
+                        },
+
+                        //render the options view
+                        render : function() {
+                                var addhtml = this.template;
+                                this.$el.html( addhtml );
+                                return this;
+                        },
+
+                        //add options interactions
+                        events : {
+                                'click #toggleshowautosaves' : 'toggleshowautosaves',
+                                'click #showsplitview' : 'showsplitview'
+                        },
+
+                        //
+                        //toggle include autosaves 
+                        //
+                        toggleshowautosaves : function() {
+                                var self = this;
+                                if ( $( '#toggleshowautosaves' ).is( ':checked' ) ) {
+                                        REVAPP._autosaves = true ;
+                                } else {
+                                        REVAPP._autosaves = false ;
+                                }
+                                //refresh the model data
+
+                                REVAPP.reloadmodel();
+                                //TODO check for two handle mode
+                                
+                        },
+
+                        //
+                        //toggle showing the split diff view
+                        //
+                        showsplitview :  function() {
+                                var self = this;
+
+                                if ( $( 'input#showsplitview' ).is( ':checked' ) ) {
+                                        REVAPP._showsplitview = 'true';
+                                        $('.revisiondiffcontainer').addClass('diffsplit');
+                                } else {
+                                        REVAPP._showsplitview = '';
+                                        $('.revisiondiffcontainer').removeClass('diffsplit');
+                                }
+
+                                REVAPP.reloadmodel();
+                        }
+                }),
+
+                //
+                //main interactions view
+                //
+                Interact : Backbone.View.extend({
+                        el : $('#backbonerevisionsinteract')[0],
+                        tagName : 'revisionvinteract',
+                        className : 'revisionvinteract-container',
+                        template : wp.template('revisionvinteract'),
+
+                        initialize : function() {
+                        },
+
+                        render : function() {
+                                var self = this;
+
+                                var addhtml = this.template;
+                                this.$el.html( addhtml );
+                                $( '#diff_max, #diff_maxof' ).html( this.model.length );
+                                $( '#diff_count' ).html( REVAPP._right_diff );
+                                $( '#diff_left_count_inner' ).html( 0 == REVAPP._left_diff ? '' : 'revision' + REVAPP._left_diff );
+
+                                var modelcount = REVAPP._revisions.length;
+
+                                slider = $(&quot;#slider&quot;);
+                                if ( 1 == REVAPP._compareoneortwo ) {
+                                        //set up the slider with a single handle
+                                        slider.slider({
+                                                value : REVAPP._right_diff-1,
+                                                min : 0,
+                                                max : modelcount-1,
+                                                step : 1,
+
+                                                //slide interactions for one handles slider
+                                                slide : function( event, ui ) {
+                                                        if ( REVAPP.right_model_loading ) //left model stoll loading, prevent sliding left handle
+                                                                                return false;
+
+                                                        REVAPP._right_diff =( ui.value+1 );
+                                                        $( '#diff_count' ).html( REVAPP._right_diff );
+                                                        REVAPP._revisionView.render();
+                                                }
+                                        });
+                                        $( '.revisiondiffcontainer' ).removeClass( 'comparetwo' );
+                                } else { //comparing more than one, eg 2
+                                        //set up the slider with two handles
+                                        slider.slider({
+                                                values : [ REVAPP._left_diff, REVAPP._right_diff + 1 ],
+                                                min : 1,
+                                                max : modelcount+1,
+                                                step : 1,
+                                                range: true,
+
+                                                //in two handled mode when user starts dragging, swap in precalculated diff for handle
+                                                start : function (event, ui ) {
+                                                        var index = $( ui.handle ).index(); //0 (left) or 1 (right)
+
+                                                        switch ( index ) {
+                                                                case 1: //left handle drag
+                                                                        if ( REVAPP.left_model_loading ) //left model stoll loading, prevent sliding left handle
+                                                                                return false;
+
+                                                                        if ( REVAPP._revisionView.model !== REVAPP._left_handle_revisions &amp;&amp;
+                                                                                        null != REVAPP._left_handle_revisions )
+                                                                                REVAPP._revisionView.model = REVAPP._left_handle_revisions;
+
+                                                                        REVAPP._revisionView.draggingleft = true;
+                                                                        break;
+
+                                                                case 2: //right
+                                                                        if ( REVAPP.right_model_loading ) //right model stoll loading, prevent sliding right handle
+                                                                                return false;
+
+                                                                        //one extra spot at left end when comparing two
+                                                                        if ( REVAPP._revisionView.model !== REVAPP._right_handle_revisions &amp;&amp;
+                                                                                        null != REVAPP._right_handle_revisions )
+                                                                                REVAPP._revisionView.model = REVAPP._right_handle_revisions;
+
+                                                                        REVAPP._revisionView.draggingleft = false;
+                                                                        REVAPP._right_diff = ui.values[1] - 1 ;
+                                                                        break;
+                                                        }
+                                                },
+
+                                                //when sliding in two handled mode change appropriate value
+                                                slide : function( event, ui ) {
+                                                        if ( ui.values[0] == ui.values[1] ) //prevent compare to self
+                                                                return false;
+
+                                                        var index = $( ui.handle ).index(); //0 (left) or 1 (right)
+
+                                                        switch ( index ) {
+                                                                case 1: //left
+                                                                        if ( REVAPP.left_model_loading ) //left model stoll loading, prevent sliding left handle
+                                                                                return false;
+
+                                                                        REVAPP._left_diff = ui.values[0] - 1; //one extra spot at left end when comparing two
+                                                                        break;
+
+                                                                case 2: //right
+                                                                        if ( REVAPP.right_model_loading ) //right model stoll loading, prevent sliding right handle
+                                                                                return false;
+
+                                                                        REVAPP._right_diff = ui.values[1] - 1 ;
+                                                                        break;
+                                                        }
+
+                                                        $( '#diff_count' ).html( REVAPP._right_diff );
+
+                                                        if ( 0 == REVAPP._left_diff ) {
+                                                                $( '.revisiondiffcontainer' ).addClass( 'currentversion' );
+
+                                                        } else {
+                                                                $( '.revisiondiffcontainer' ).removeClass( 'currentversion' );
+                                                                $( '#diff_left_count_inner' ).html( REVAPP._left_diff );
+                                                        }
+
+                                                        REVAPP._revisionView.render(); //render the diff view
+                                                },
+
+                                                //when the user stops sliding  in 2 handle mode, recalculate diffs
+                                                stop : function( event, ui ) {
+                                                        if ( 2 == REVAPP._compareoneortwo ) {
+                                                                //calculate and generate a diff for comparing to the left handle
+                                                                //and the right handle, swap out when dragging
+                                                                if ( ! (REVAPP.left_model_loading &amp;&amp; REVAPP.right_model.loading ) ) {
+                                                                        REVAPP.reloadleftright();
+                                                                }
+                                                        }
+                                                }
+                                        });
+                                        $( '.revisiondiffcontainer' ).addClass( 'comparetwo' );
+                                }
+
+                                return this;
+                        },
+
+                        //next and previous buttons, only available in compare one mode
+                        events : {
+                                'click #next' : 'nextrevision',
+                                'click #previous' : 'previousrevision'
+                        },
+
+                        //go to the next revision
+                        nextrevision : function() {
+                                if ( REVAPP._right_diff &lt; this.model.length ) //unless at right boundry
+                                        REVAPP._right_diff = REVAPP._right_diff + 1 ;
+
+                                REVAPP._revisionView.render();
+
+                                $( '#diff_count' ).html( REVAPP._right_diff );
+                                $( '#slider' ).slider( 'value', REVAPP._right_diff - 1 ).trigger( 'slide' );
+                        },
+
+                        //go the the previous revision
+                        previousrevision : function() {
+                                if ( REVAPP._right_diff &gt; 1 ) //unless at left boundry
+                                                REVAPP._right_diff = REVAPP._right_diff - 1 ;
+
+                                REVAPP._revisionView.render();
+
+                                $( '#diff_count' ).html( REVAPP._right_diff );
+                                $( '#slider' ).slider( 'value', REVAPP._right_diff - 1 ).trigger( 'slide' );
+                        }
+                })
+        });
+
+        //instantiate Revision Application
+        REVAPP = new wp.revisions.App();
+        //TODO consider enable back button to step back thru states?
+        Backbone.history.start();
+
+}(jQuery));
</ins></span></pre></div>
<a id="trunkwpadminrevisionphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/revision.php (23505 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/revision.php        2013-02-28 09:03:10 UTC (rev 23505)
+++ trunk/wp-admin/revision.php        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -8,15 +8,9 @@
</span><span class="cx"> 
</span><span class="cx"> /** WordPress Administration Bootstrap */
</span><span class="cx"> require_once('./admin.php');
</span><ins>+wp_reset_vars( array( 'revision', 'action' ) );
</ins><span class="cx"> 
</span><del>-wp_enqueue_script('list-revisions');
-
-wp_reset_vars(array('revision', 'left', 'right', 'action'));
-
</del><span class="cx"> $revision_id = absint($revision);
</span><del>-$left        = absint($left);
-$right       = absint($right);
-
</del><span class="cx"> $redirect = 'edit.php';
</span><span class="cx"> 
</span><span class="cx"> switch ( $action ) :
</span><span class="lines">@@ -33,75 +27,13 @@
</span><span class="cx">                 $redirect = 'edit.php?post_type=' . $post-&gt;post_type;
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><ins>+        check_admin_referer( &quot;restore-post_{$post-&gt;ID}|{$revision-&gt;ID}&quot; );
</ins><span class="cx"> 
</span><del>-        check_admin_referer( &quot;restore-post_$post-&gt;ID|$revision-&gt;ID&quot; );
-
</del><span class="cx">         wp_restore_post_revision( $revision-&gt;ID );
</span><span class="cx">         $redirect = add_query_arg( array( 'message' =&gt; 5, 'revision' =&gt; $revision-&gt;ID ), get_edit_post_link( $post-&gt;ID, 'url' ) );
</span><span class="cx">         break;
</span><del>-case 'diff' :
-        if ( !$left_revision  = get_post( $left ) )
-                break;
-        if ( !$right_revision = get_post( $right ) )
-                break;
-
-        if ( !current_user_can( 'read_post', $left_revision-&gt;ID ) || !current_user_can( 'read_post', $right_revision-&gt;ID ) )
-                break;
-
-        // If we're comparing a revision to itself, redirect to the 'view' page for that revision or the edit page for that post
-        if ( $left_revision-&gt;ID == $right_revision-&gt;ID ) {
-                $redirect = get_edit_post_link( $left_revision-&gt;ID );
-                include( './js/revisions-js.php' );
-                break;
-        }
-
-        // Don't allow reverse diffs?
-        if ( strtotime($right_revision-&gt;post_modified_gmt) &lt; strtotime($left_revision-&gt;post_modified_gmt) ) {
-                $redirect = add_query_arg( array( 'left' =&gt; $right, 'right' =&gt; $left ) );
-                break;
-        }
-
-        if ( $left_revision-&gt;ID == $right_revision-&gt;post_parent ) // right is a revision of left
-                $post =&amp; $left_revision;
-        elseif ( $left_revision-&gt;post_parent == $right_revision-&gt;ID ) // left is a revision of right
-                $post =&amp; $right_revision;
-        elseif ( $left_revision-&gt;post_parent == $right_revision-&gt;post_parent ) // both are revisions of common parent
-                $post = get_post( $left_revision-&gt;post_parent );
-        else
-                break; // Don't diff two unrelated revisions
-
-        if ( ! WP_POST_REVISIONS || !post_type_supports($post-&gt;post_type, 'revisions') ) { // Revisions disabled
-                if (
-                        // we're not looking at an autosave
-                        ( !wp_is_post_autosave( $left_revision ) &amp;&amp; !wp_is_post_autosave( $right_revision ) )
-                ||
-                        // we're not comparing an autosave to the current post
-                        ( $post-&gt;ID !== $left_revision-&gt;ID &amp;&amp; $post-&gt;ID !== $right_revision-&gt;ID )
-                ) {
-                        $redirect = 'edit.php?post_type=' . $post-&gt;post_type;
-                        break;
-                }
-        }
-
-        if (
-                // They're the same
-                $left_revision-&gt;ID == $right_revision-&gt;ID
-        ||
-                // Neither is a revision
-                ( !wp_get_post_revision( $left_revision-&gt;ID ) &amp;&amp; !wp_get_post_revision( $right_revision-&gt;ID ) )
-        )
-                break;
-
-        $post_title = '&lt;a href=&quot;' . get_edit_post_link() . '&quot;&gt;' . get_the_title() . '&lt;/a&gt;';
-        $h2 = sprintf( __( 'Compare Revisions of &amp;#8220;%1$s&amp;#8221;' ), $post_title );
-        $title = __( 'Revisions' );
-
-        $left  = $left_revision-&gt;ID;
-        $right = $right_revision-&gt;ID;
-
-        $redirect = false;
-        break;
</del><span class="cx"> case 'view' :
</span><ins>+case 'edit' :
</ins><span class="cx"> default :
</span><span class="cx">         if ( !$revision = wp_get_post_revision( $revision_id ) )
</span><span class="cx">                 break;
</span><span class="lines">@@ -119,13 +51,9 @@
</span><span class="cx"> 
</span><span class="cx">         $post_title = '&lt;a href=&quot;' . get_edit_post_link() . '&quot;&gt;' . get_the_title() . '&lt;/a&gt;';
</span><span class="cx">         $revision_title = wp_post_revision_title( $revision, false );
</span><del>-        $h2 = sprintf( __( 'Revision for &amp;#8220;%1$s&amp;#8221; created on %2$s' ), $post_title, $revision_title );
</del><ins>+        $h2 = sprintf( __( 'Compare Revisions of &amp;#8220;%1$s&amp;#8221;' ), $post_title );
</ins><span class="cx">         $title = __( 'Revisions' );
</span><span class="cx"> 
</span><del>-        // Sets up the diff radio buttons
-        $left  = $revision-&gt;ID;
-        $right = $post-&gt;ID;
-
</del><span class="cx">         $redirect = false;
</span><span class="cx">         break;
</span><span class="cx"> endswitch;
</span><span class="lines">@@ -145,79 +73,83 @@
</span><span class="cx"> else
</span><span class="cx">         $parent_file = $submenu_file = 'edit.php';
</span><span class="cx"> 
</span><ins>+wp_enqueue_style( 'revisions' );
+wp_enqueue_script( 'revisions' );
+
</ins><span class="cx"> require_once( './admin-header.php' );
</span><span class="cx"> 
</span><ins>+//TODO - Some of the translations below split things into multiple strings that are contextually related and this makes it pretty impossible for RTL translation.
+//TODO can we pass the context in a better way
</ins><span class="cx"> ?&gt;
</span><ins>+&lt;script type=&quot;text/javascript&quot;&gt;
+var wpRevisionsSettings = &lt;?php echo json_encode( array( 'post_id' =&gt; $post-&gt;ID, 'nonce' =&gt; wp_create_nonce( 'revisions-ajax-nonce' ) ) ); ?&gt;;
+&lt;/script&gt;
</ins><span class="cx"> 
</span><del>-&lt;div class=&quot;wrap&quot;&gt;
</del><ins>+&lt;div id=&quot;backbonerevisionsoptions&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> 
</span><del>-&lt;h2 class=&quot;long-header&quot;&gt;&lt;?php echo $h2; ?&gt;&lt;/h2&gt;
-
-&lt;table class=&quot;form-table ie-fixed&quot;&gt;
-        &lt;col class=&quot;th&quot; /&gt;
-&lt;?php if ( 'diff' == $action ) : ?&gt;
-&lt;tr id=&quot;revision&quot;&gt;
-        &lt;th scope=&quot;row&quot;&gt;&lt;/th&gt;
-        &lt;th scope=&quot;col&quot; class=&quot;th-full&quot;&gt;
-                &lt;span class=&quot;alignleft&quot;&gt;&lt;?php printf( __('Older: %s'), wp_post_revision_title( $left_revision ) ); ?&gt;&lt;/span&gt;
-                &lt;span class=&quot;alignright&quot;&gt;&lt;?php printf( __('Newer: %s'), wp_post_revision_title( $right_revision ) ); ?&gt;&lt;/span&gt;
-        &lt;/th&gt;
-&lt;/tr&gt;
-&lt;?php endif;
-
-// use get_post_to_edit filters?
-$identical = true;
-foreach ( _wp_post_revision_fields() as $field =&gt; $field_title ) :
-        if ( 'diff' == $action ) {
-                $left_content = apply_filters( &quot;_wp_post_revision_field_$field&quot;, $left_revision-&gt;$field, $field, $left_revision, 'left' );
-                $right_content = apply_filters( &quot;_wp_post_revision_field_$field&quot;, $right_revision-&gt;$field, $field, $right_revision, 'right' );
-                if ( !$content = wp_text_diff( $left_content, $right_content ) )
-                        continue; // There is no difference between left and right
-                $identical = false;
-        } else {
-                add_filter( &quot;_wp_post_revision_field_$field&quot;, 'htmlspecialchars' );
-                $content = apply_filters( &quot;_wp_post_revision_field_$field&quot;, $revision-&gt;$field, $field, $revision, '' );
-        }
-        ?&gt;
-
-        &lt;tr id=&quot;revision-field-&lt;?php echo $field; ?&gt;&quot;&gt;
-                &lt;th scope=&quot;row&quot;&gt;&lt;?php echo esc_html( $field_title ); ?&gt;&lt;/th&gt;
-                &lt;td&gt;&lt;div class=&quot;pre&quot;&gt;&lt;?php echo $content; ?&gt;&lt;/div&gt;&lt;/td&gt;
-        &lt;/tr&gt;
-
-        &lt;?php
-
-endforeach;
-
-if ( 'diff' == $action &amp;&amp; $identical ) :
-
-        ?&gt;
-
-        &lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;div class=&quot;updated&quot;&gt;&lt;p&gt;&lt;?php _e( 'These revisions are identical.' ); ?&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
-
-        &lt;?php
-
-endif;
-
</del><ins>+&lt;br class=&quot;clear&quot;/&gt;
+&lt;div class=&quot;wrap&quot;&gt;
+        &lt;div class=&quot;icon32 icon32-posts-post&quot; id=&quot;icon-edit&quot;&gt;&lt;br&gt;&lt;/div&gt;
+        &lt;div class=&quot;revisiondiffcontainer diffsplit currentversion rightmodelloading&quot;&gt;
+                &lt;div id=&quot;modelsloading&quot; class=&quot;updated message&quot;&gt;&lt;span class=&quot;spinner&quot; &gt;&lt;/span&gt; &lt;?php _e( 'Calculating revision diffs' ); ?&gt;&lt;/div&gt;
+                &lt;h2 class=&quot;long-header&quot;&gt;&lt;?php echo $h2; ?&gt;&lt;/h2&gt;
+                &lt;div id=&quot;backbonerevisionsinteract&quot;&gt;&lt;/div&gt;
+                &lt;div id=&quot;backbonerevisionsdiff&quot;&gt;&lt;/div&gt;
+&lt;hr /&gt;
+&lt;?php
+        $comparetworevisionslink = get_edit_post_link( $revision-&gt;ID );
</ins><span class="cx"> ?&gt;
</span><ins>+        &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx"> 
</span><del>-&lt;/table&gt;
</del><ins>+&lt;script id=&quot;tmpl-revision&quot; type=&quot;text/html&quot;&gt;
+        &lt;div id=&quot;diffsubheader&quot;&gt;
+                &lt;span id=&quot;diff_from_current_revision&quot;&gt;&lt;?php _e( 'Current version' ); ?&gt;&lt;?php _e( '- compared to -' ); ?&gt;&lt;/span&gt;
+                &lt;div id=&quot;difftitlefrom&quot;&gt;{{{ data.revision_from_date_author }}} &lt;?php _e( '- compared to -' ); ?&gt;&lt;/div&gt;
+                &lt;div id=&quot;difftitle&quot;&gt;{{{ data.revision_date_author }}}&lt;/div&gt;
+                &lt;div id=&quot;diffcancel&quot;&gt;&lt;input class=&quot;button&quot; onClick=&quot;document.location='&lt;?php echo get_edit_post_link( $post-&gt;ID ); ?&gt;'&quot; type=&quot;submit&quot; id=&quot;cancel&quot; value=&quot;&lt;?php esc_attr_e( 'Cancel' )?&gt;&quot; /&gt;&lt;/div&gt;
+                &lt;div id=&quot;diffrestore&quot;&gt;&lt;input class=&quot;button button-primary&quot; onClick=&quot;document.location='{{{ data.restoreaction }}}'&quot; type=&quot;submit&quot; id=&quot;restore&quot; value=&quot;&lt;?php esc_attr_e( 'Restore' )?&gt;&quot; /&gt;&lt;/div&gt;
+                &lt;div id=&quot;comparetworevisions&quot;&gt;&lt;input type=&quot;checkbox&quot; id=&quot;comparetwo&quot; value=&quot;comparetwo&quot; {{{ data.comparetwochecked }}} name=&quot;comparetwo&quot;/&gt; &lt;?php esc_attr_e( 'Compare two revisions' )?&gt;&lt;/div&gt;
+        &lt;/div&gt;
+        &lt;div id=&quot;removedandadded&quot;&gt;
+                &lt;div id=&quot;removed&quot;&gt;&lt;?php _e( 'Removed -' ); ?&gt;&lt;/div&gt;
+                &lt;div id=&quot;added&quot;&gt;&lt;?php _e( 'Added +' ); ?&gt;&lt;/div&gt;
+        &lt;/div
+        &lt;div&gt;{{{ data.revisiondiff }}}&lt;/div&gt;
+&lt;/script&gt;
</ins><span class="cx"> 
</span><del>-&lt;br class=&quot;clear&quot; /&gt;
</del><ins>+&lt;script id=&quot;tmpl-revisionvinteract&quot; type=&quot;text/html&quot;&gt;
+        &lt;div id=&quot;diffheader&quot;&gt;
+&lt;div id=&quot;diffprevious&quot;&gt;&lt;input class=&quot;button&quot; type=&quot;submit&quot; id=&quot;previous&quot; value=&quot;Previous&quot; /&gt;&lt;/div&gt;
+                        &lt;div id=&quot;diffnext&quot;&gt;&lt;input class=&quot;button&quot; type=&quot;submit&quot; id=&quot;next&quot; value=&quot;Next&quot; /&gt;&lt;/div&gt;
+                        &lt;div id=&quot;diffslider&quot;&gt;
+        &lt;div id=&quot;revisioncount&quot;&gt;
+                                        &lt;?php _e( 'Comparing' ); ?&gt;
+                                        &lt;span id=&quot;diff_left_count&quot;&gt; &lt;?php _e( 'revision' ); ?&gt;&lt;/span&gt; &lt;span id=&quot;diff_left_count_inner&quot;&gt;&lt;/span&gt;
+                                        &lt;span id=&quot;diff_left_current_revision&quot;&gt;&lt;?php _e( 'current version' ); ?&gt;&lt;/span&gt;
+                                        &lt;span id=&quot;diff_revision_from&quot;&gt;{{{ data.diff_revision_from }}}&lt;/span&gt;
+                                        &lt;?php _e( ' to revision' ); ?&gt;
+                                        &lt;span id=&quot;diff_count&quot;&gt;{{{ data.current_diff }}}&lt;/span&gt;
+                                        &lt;?php _e( ' of ' ); ?&gt;
+                                        &lt;span id=&quot;diff_max&quot; &gt;&lt;/span&gt;
+                                &lt;/div&gt;
</ins><span class="cx"> 
</span><del>-&lt;h3&gt;&lt;?php echo $title; ?&gt;&lt;/h3&gt;
-
</del><ins>+                        &lt;div id=&quot;slider&quot;&gt;&lt;/div&gt;
+                &lt;/div&gt;
+        &lt;/div&gt;
+&lt;/script&gt;
</ins><span class="cx"> &lt;?php
</span><del>-
-$args = array( 'format' =&gt; 'form-table', 'parent' =&gt; true, 'right' =&gt; $right, 'left' =&gt; $left );
-if ( ! WP_POST_REVISIONS || !post_type_supports($post-&gt;post_type, 'revisions') )
-        $args['type'] = 'autosave';
-
-wp_list_post_revisions( $post, $args );
-
-?&gt;
-
-&lt;/div&gt;
-
-&lt;?php
-require_once( './admin-footer.php' );
</del><ins>+/*
+TODO Convert these into screen options
+&lt;script id=&quot;tmpl-revisionoptions&quot; type=&quot;text/html&quot;&gt;
+        &lt;div id=&quot;revisionoptions&quot;&gt;
+                &lt;div id=&quot;showsplitviewoption&quot;&gt;
+                        &lt;input type='checkbox' id=&quot;show_split_view&quot; checked=&quot;checked&quot; value=&quot;1&quot; /&gt; &lt;?php _e( 'Show split diff view' ); ?&gt;
+                &lt;/div&gt;
+                &lt;div id=&quot;toggleshowautosavesoption&quot;&gt;
+                        &lt;input type='checkbox' id=&quot;toggleshowautosaves&quot; value=&quot;1&quot; /&gt; &lt;?php _e( 'Show autosaves' ); ?&gt;
+                &lt;/div&gt;
+        &lt;/div&gt;
+&lt;/script&gt;
+*/
+require_once( './admin-footer.php' );
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludescssjqueryuislidercss"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/css/jquery-ui-slider.css (0 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/jquery-ui-slider.css                                (rev 0)
+++ trunk/wp-includes/css/jquery-ui-slider.css        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -0,0 +1,544 @@
</span><ins>+/*! jQuery UI - v1.10.1 - 2013-02-15
+* http://jqueryui.com
+* Includes: jquery.ui.core.css, jquery.ui.slider.css
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&amp;fwDefault=bold&amp;fsDefault=1.1em&amp;cornerRadius=4px&amp;bgColorHeader=f6a828&amp;bgTextureHeader=gloss_wave&amp;bgImgOpacityHeader=35&amp;borderColorHeader=e78f08&amp;fcHeader=ffffff&amp;iconColorHeader=ffffff&amp;bgColorContent=eeeeee&amp;bgTextureContent=highlight_soft&amp;bgImgOpacityContent=100&amp;borderColorContent=dddddd&amp;fcContent=333333&amp;iconColorContent=222222&amp;bgColorDefault=f6f6f6&amp;bgTextureDefault=glass&amp;bgImgOpacityDefault=100&amp;borderColorDefault=cccccc&amp;fcDefault=1c94c4&amp;iconColorDefault=ef8c08&amp;bgColorHover=fdf5ce&amp;bgTextureHover=glass&amp;bgImgOpacityHover=100&amp;borderColorHover=fbcb09&amp;fcHover=c77405&amp;iconColorHover=ef8c08&amp;bgColorActive=ffffff&amp;bgTextureActive=glass&amp;bgImgOpacityActive=65&amp;borderColorActive=fbd850&amp;fcActive=eb8f00&amp;iconColorActive=ef8c08&amp;
 bgColorHighlight=ffe45c&amp;bgTextureHighlight=highlight_soft&amp;bgImgOpacityHighlight=75&amp;borderColorHighlight=fed22f&amp;fcHighlight=363636&amp;iconColorHighlight=228ef1&amp;bgColorError=b81900&amp;bgTextureError=diagonals_thick&amp;bgImgOpacityError=18&amp;borderColorError=cd0a0a&amp;fcError=ffffff&amp;iconColorError=ffd27a&amp;bgColorOverlay=666666&amp;bgTextureOverlay=diagonals_thick&amp;bgImgOpacityOverlay=20&amp;opacityOverlay=50&amp;bgColorShadow=000000&amp;bgTextureShadow=flat&amp;bgImgOpacityShadow=10&amp;opacityShadow=20&amp;thicknessShadow=5px&amp;offsetTopShadow=-5px&amp;offsetLeftShadow=-5px&amp;cornerRadiusShadow=5px
+* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden {
+        display: none;
+}
+.ui-helper-hidden-accessible {
+        border: 0;
+        clip: rect(0 0 0 0);
+        height: 1px;
+        margin: -1px;
+        overflow: hidden;
+        padding: 0;
+        position: absolute;
+        width: 1px;
+}
+.ui-helper-reset {
+        margin: 0;
+        padding: 0;
+        border: 0;
+        outline: 0;
+        line-height: 1.3;
+        text-decoration: none;
+        font-size: 100%;
+        list-style: none;
+}
+.ui-helper-clearfix:before,
+.ui-helper-clearfix:after {
+        content: &quot;&quot;;
+        display: table;
+        border-collapse: collapse;
+}
+.ui-helper-clearfix:after {
+        clear: both;
+}
+.ui-helper-clearfix {
+        min-height: 0; /* support: IE7 */
+}
+.ui-helper-zfix {
+        width: 100%;
+        height: 100%;
+        top: 0;
+        left: 0;
+        position: absolute;
+        opacity: 0;
+        filter:Alpha(Opacity=0);
+}
+
+.ui-front {
+        z-index: 100;
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled {
+        cursor: default !important;
+}
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+        display: block;
+        text-indent: -99999px;
+        overflow: hidden;
+        background-repeat: no-repeat;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay {
+        position: fixed;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+}
+.ui-slider {
+        position: relative;
+        text-align: left;
+}
+.ui-slider .ui-slider-handle {
+        position: absolute;
+        z-index: 2;
+        width: 1.2em;
+        height: 1.2em;
+        cursor: default;
+}
+.ui-slider .ui-slider-range {
+        position: absolute;
+        z-index: 1;
+        font-size: .7em;
+        display: block;
+        border: 0;
+        background-position: 0 0;
+}
+
+/* For IE8 - See #6727 */
+.ui-slider.ui-state-disabled .ui-slider-handle,
+.ui-slider.ui-state-disabled .ui-slider-range {
+        filter: inherit;
+}
+
+.ui-slider-horizontal {
+        height: .8em;
+}
+.ui-slider-horizontal .ui-slider-handle {
+        top: -.3em;
+        margin-left: -.6em;
+}
+.ui-slider-horizontal .ui-slider-range {
+        top: 0;
+        height: 100%;
+}
+.ui-slider-horizontal .ui-slider-range-min {
+        left: 0;
+}
+.ui-slider-horizontal .ui-slider-range-max {
+        right: 0;
+}
+
+.ui-slider-vertical {
+        width: .8em;
+        height: 100px;
+}
+.ui-slider-vertical .ui-slider-handle {
+        left: -.3em;
+        margin-left: 0;
+        margin-bottom: -.6em;
+}
+.ui-slider-vertical .ui-slider-range {
+        left: 0;
+        width: 100%;
+}
+.ui-slider-vertical .ui-slider-range-min {
+        bottom: 0;
+}
+.ui-slider-vertical .ui-slider-range-max {
+        top: 0;
+}
+
+/* Component containers
+----------------------------------*/
+.ui-widget {
+        font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
+        font-size: 1.1em;
+}
+.ui-widget .ui-widget {
+        font-size: 1em;
+}
+.ui-widget input,
+.ui-widget select,
+.ui-widget textarea,
+.ui-widget button {
+        font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
+        font-size: 1em;
+}
+.ui-widget-content {
+        border: 1px solid #dddddd;
+        background: #eeeeee url(../images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x;
+        color: #333333;
+}
+.ui-widget-content a {
+        color: #333333;
+}
+.ui-widget-header {
+        border: 1px solid #e78f08;
+        background: #f6a828 url(../images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x;
+        color: #ffffff;
+        font-weight: bold;
+}
+.ui-widget-header a {
+        color: #ffffff;
+}
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default,
+.ui-widget-content .ui-state-default,
+.ui-widget-header .ui-state-default {
+        border: 1px solid #cccccc;
+        background: #f6f6f6 url(../images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x;
+        font-weight: bold;
+        color: #1c94c4;
+}
+.ui-state-default a,
+.ui-state-default a:link,
+.ui-state-default a:visited {
+        color: #1c94c4;
+        text-decoration: none;
+}
+.ui-state-hover,
+.ui-widget-content .ui-state-hover,
+.ui-widget-header .ui-state-hover,
+.ui-state-focus,
+.ui-widget-content .ui-state-focus,
+.ui-widget-header .ui-state-focus {
+        border: 1px solid #fbcb09;
+        background: #fdf5ce url(../images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x;
+        font-weight: bold;
+        color: #c77405;
+}
+.ui-state-hover a,
+.ui-state-hover a:hover,
+.ui-state-hover a:link,
+.ui-state-hover a:visited {
+        color: #c77405;
+        text-decoration: none;
+}
+.ui-state-active,
+.ui-widget-content .ui-state-active,
+.ui-widget-header .ui-state-active {
+        border: 1px solid #fbd850;
+        background: #ffffff url(../images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
+        font-weight: bold;
+        color: #eb8f00;
+}
+.ui-state-active a,
+.ui-state-active a:link,
+.ui-state-active a:visited {
+        color: #eb8f00;
+        text-decoration: none;
+}
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight,
+.ui-widget-content .ui-state-highlight,
+.ui-widget-header .ui-state-highlight {
+        border: 1px solid #fed22f;
+        background: #ffe45c url(../images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x;
+        color: #363636;
+}
+.ui-state-highlight a,
+.ui-widget-content .ui-state-highlight a,
+.ui-widget-header .ui-state-highlight a {
+        color: #363636;
+}
+.ui-state-error,
+.ui-widget-content .ui-state-error,
+.ui-widget-header .ui-state-error {
+        border: 1px solid #cd0a0a;
+        background: #b81900 url(../images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat;
+        color: #ffffff;
+}
+.ui-state-error a,
+.ui-widget-content .ui-state-error a,
+.ui-widget-header .ui-state-error a {
+        color: #ffffff;
+}
+.ui-state-error-text,
+.ui-widget-content .ui-state-error-text,
+.ui-widget-header .ui-state-error-text {
+        color: #ffffff;
+}
+.ui-priority-primary,
+.ui-widget-content .ui-priority-primary,
+.ui-widget-header .ui-priority-primary {
+        font-weight: bold;
+}
+.ui-priority-secondary,
+.ui-widget-content .ui-priority-secondary,
+.ui-widget-header .ui-priority-secondary {
+        opacity: .7;
+        filter:Alpha(Opacity=70);
+        font-weight: normal;
+}
+.ui-state-disabled,
+.ui-widget-content .ui-state-disabled,
+.ui-widget-header .ui-state-disabled {
+        opacity: .35;
+        filter:Alpha(Opacity=35);
+        background-image: none;
+}
+.ui-state-disabled .ui-icon {
+        filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
+}
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+        width: 16px;
+        height: 16px;
+        background-position: 16px 16px;
+}
+.ui-icon,
+.ui-widget-content .ui-icon {
+        background-image: url(../images/ui-icons_222222_256x240.png);
+}
+.ui-widget-header .ui-icon {
+        background-image: url(../images/ui-icons_ffffff_256x240.png);
+}
+.ui-state-default .ui-icon {
+        background-image: url(../images/ui-icons_ef8c08_256x240.png);
+}
+.ui-state-hover .ui-icon,
+.ui-state-focus .ui-icon {
+        background-image: url(../images/ui-icons_ef8c08_256x240.png);
+}
+.ui-state-active .ui-icon {
+        background-image: url(../images/ui-icons_ef8c08_256x240.png);
+}
+.ui-state-highlight .ui-icon {
+        background-image: url(../images/ui-icons_228ef1_256x240.png);
+}
+.ui-state-error .ui-icon,
+.ui-state-error-text .ui-icon {
+        background-image: url(../images/ui-icons_ffd27a_256x240.png);
+}
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-on { background-position: -96px -144px; }
+.ui-icon-radio-off { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all,
+.ui-corner-top,
+.ui-corner-left,
+.ui-corner-tl {
+        border-top-left-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-top,
+.ui-corner-right,
+.ui-corner-tr {
+        border-top-right-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-bottom,
+.ui-corner-left,
+.ui-corner-bl {
+        border-bottom-left-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-bottom,
+.ui-corner-right,
+.ui-corner-br {
+        border-bottom-right-radius: 4px;
+}
+
+/* Overlays */
+.ui-widget-overlay {
+        background: #666666 url(../images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat;
+        opacity: .5;
+        filter: Alpha(Opacity=50);
+}
+.ui-widget-shadow {
+        margin: -5px 0 0 -5px;
+        padding: 5px;
+        background: #000000 url(../images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x;
+        opacity: .2;
+        filter: Alpha(Opacity=20);
+        border-radius: 5px;
+}
</ins></span></pre></div>
<a id="trunkwpincludesjstemplatejs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/template.js (0 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/template.js                                (rev 0)
+++ trunk/wp-includes/js/template.js        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+window.wp = window.wp || {};
+
+(function ($) {
+        var template;
+        /**
+         * wp.template( id )
+         *
+         * Fetches a template by id.
+         *
+         * @param  {string} id   A string that corresponds to a DOM element with an id prefixed with &quot;tmpl-&quot;.
+         *                       For example, &quot;attachment&quot; maps to &quot;tmpl-attachment&quot;.
+         * @return {function}    A function that lazily-compiles the template requested.
+         */
+        template = wp.template = _.memoize(function ( id ) {
+                var compiled,
+                        options = {
+                                evaluate:    /&lt;#([\s\S]+?)#&gt;/g,
+                                interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
+                                escape:      /\{\{([^\}]+?)\}\}(?!\})/g,
+                                variable:    'data'
+                        };
+
+                return function ( data ) {
+                        compiled = compiled || _.template( $( '#tmpl-' + id ).html(), null, options );
+                        return compiled( data );
+                };
+        });
+
+}(jQuery));
</ins></span></pre></div>
<a id="trunkwpincludespluggablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/pluggable.php (23505 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/pluggable.php        2013-02-28 09:03:10 UTC (rev 23505)
+++ trunk/wp-includes/pluggable.php        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -1713,17 +1713,21 @@
</span><span class="cx"> 
</span><span class="cx">         $left_lines  = explode(&quot;\n&quot;, $left_string);
</span><span class="cx">         $right_lines = explode(&quot;\n&quot;, $right_string);
</span><del>-
</del><span class="cx">         $text_diff = new Text_Diff($left_lines, $right_lines);
</span><del>-        $renderer  = new WP_Text_Diff_Renderer_Table();
</del><ins>+        $renderer  = new WP_Text_Diff_Renderer_Table( $args );
</ins><span class="cx">         $diff = $renderer-&gt;render($text_diff);
</span><span class="cx"> 
</span><span class="cx">         if ( !$diff )
</span><span class="cx">                 return '';
</span><span class="cx"> 
</span><span class="cx">         $r  = &quot;&lt;table class='diff'&gt;\n&quot;;
</span><del>-        $r .= &quot;&lt;col class='ltype' /&gt;&lt;col class='content' /&gt;&lt;col class='ltype' /&gt;&lt;col class='content' /&gt;&quot;;
</del><span class="cx"> 
</span><ins>+        if ( isset( $args[ 'showsplitview' ] ) &amp;&amp; 'true' == $args[ 'showsplitview' ] ) {
+                $r .= &quot;&lt;col class='content diffsplit left' /&gt;&lt;col class='content diffsplit middle' /&gt;&lt;col class='content diffsplit right' /&gt;&quot;;
+        } else {
+                $r .= &quot;&lt;col class='content' /&gt;&quot;;
+        }
+
</ins><span class="cx">         if ( $args['title'] || $args['title_left'] || $args['title_right'] )
</span><span class="cx">                 $r .= &quot;&lt;thead&gt;&quot;;
</span><span class="cx">         if ( $args['title'] )
</span></span></pre></div>
<a id="trunkwpincludesposttemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post-template.php (23505 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post-template.php        2013-02-28 09:03:10 UTC (rev 23505)
+++ trunk/wp-includes/post-template.php        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -1300,23 +1300,34 @@
</span><span class="cx">         if ( !in_array( $revision-&gt;post_type, array( 'post', 'page', 'revision' ) ) )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><ins>+        $author = get_the_author_meta( 'display_name', $revision-&gt;post_author );
</ins><span class="cx">         /* translators: revision date format, see http://php.net/date */
</span><del>-        $datef = _x( 'j F, Y @ G:i', 'revision date format');
-        /* translators: 1: date */
-        $autosavef = __( '%1$s [Autosave]' );
-        /* translators: 1: date */
-        $currentf  = __( '%1$s [Current Revision]' );
</del><ins>+        $datef = _x( 'j F, Y @ G:i:s', 'revision date format');
</ins><span class="cx"> 
</span><ins>+        $gravatar = get_avatar( $revision-&gt;post_author, 18 );
+
</ins><span class="cx">         $date = date_i18n( $datef, strtotime( $revision-&gt;post_modified ) );
</span><span class="cx">         if ( $link &amp;&amp; current_user_can( 'edit_post', $revision-&gt;ID ) &amp;&amp; $link = get_edit_post_link( $revision-&gt;ID ) )
</span><span class="cx">                 $date = &quot;&lt;a href='$link'&gt;$date&lt;/a&gt;&quot;;
</span><ins>+        
+        $revision_date_author = sprintf(
+                '%s %s, %s %s (%s)',
+                $gravatar,
+                $author,
+                human_time_diff( strtotime( $revision-&gt;post_modified ), current_time( 'timestamp' ) ),
+                __( 'ago' ),
+                $date
+        );
</ins><span class="cx"> 
</span><ins>+        $autosavef = __( '%1$s [Autosave]' );
+        $currentf  = __( '%1$s [Current Revision]' );
+
</ins><span class="cx">         if ( !wp_is_post_revision( $revision ) )
</span><del>-                $date = sprintf( $currentf, $date );
</del><ins>+                $revision_date_author = sprintf( $currentf, $revision_date_author );
</ins><span class="cx">         elseif ( wp_is_post_autosave( $revision ) )
</span><del>-                $date = sprintf( $autosavef, $date );
</del><ins>+                $revision_date_author = sprintf( $autosavef, $revision_date_author );
</ins><span class="cx"> 
</span><del>-        return $date;
</del><ins>+        return $revision_date_author;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (23505 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2013-02-28 09:03:10 UTC (rev 23505)
+++ trunk/wp-includes/script-loader.php        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -270,8 +270,11 @@
</span><span class="cx">         $scripts-&gt;add( 'json2', &quot;/wp-includes/js/json2$suffix.js&quot;, array(), '2011-02-23');
</span><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'underscore', '/wp-includes/js/underscore.min.js', array(), '1.4.4', 1 );
</span><del>-        $scripts-&gt;add( 'backbone', '/wp-includes/js/backbone.min.js', array('underscore','jquery'), '0.9.2', 1 );
</del><ins>+        $scripts-&gt;add( 'template', &quot;/wp-includes/js/template$suffix.js&quot;, array('underscore'), '1.4.4', 1 );
+        $scripts-&gt;add( 'backbone', '/wp-includes/js/backbone.min.js', array('underscore','jquery', 'template'), '0.9.2', 1 );
</ins><span class="cx"> 
</span><ins>+        $scripts-&gt;add( 'revisions', &quot;/wp-admin/js/revisions$suffix.js&quot;, array( 'backbone', 'jquery-ui-slider' ), false, 1 );
+
</ins><span class="cx">         $scripts-&gt;add( 'imgareaselect', &quot;/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js&quot;, array('jquery'), '0.9.8', 1 );
</span><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'password-strength-meter', &quot;/wp-admin/js/password-strength-meter$suffix.js&quot;, array('jquery'), false, 1 );
</span><span class="lines">@@ -539,6 +542,8 @@
</span><span class="cx">         $styles-&gt;add( 'customize-controls', &quot;/wp-admin/css/customize-controls$suffix.css&quot;, array( 'wp-admin', 'colors', 'ie' ) );
</span><span class="cx">         $styles-&gt;add( 'media-views', &quot;/wp-includes/css/media-views$suffix.css&quot;, array( 'buttons' ) );
</span><span class="cx">         $styles-&gt;add( 'buttons', &quot;/wp-includes/css/buttons$suffix.css&quot; );
</span><ins>+        $styles-&gt;add( 'wp-jquery-ui-slider', &quot;/wp-includes/css/jquery-ui-slider$suffix.css&quot; );
+        $styles-&gt;add( 'revisions', &quot;/wp-admin/css/revisions$suffix.css&quot;, array( 'wp-jquery-ui-slider' ) );
</ins><span class="cx"> 
</span><span class="cx">         foreach ( $rtl_styles as $rtl_style ) {
</span><span class="cx">                 $styles-&gt;add_data( $rtl_style, 'rtl', true );
</span></span></pre></div>
<a id="trunkwpincludeswpdiffphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/wp-diff.php (23505 => 23506)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/wp-diff.php        2013-02-28 09:03:10 UTC (rev 23505)
+++ trunk/wp-includes/wp-diff.php        2013-02-28 15:14:34 UTC (rev 23506)
</span><span class="lines">@@ -60,6 +60,15 @@
</span><span class="cx">         var $inline_diff_renderer = 'WP_Text_Diff_Renderer_inline';
</span><span class="cx"> 
</span><span class="cx">         /**
</span><ins>+         * Should we show the split view or not
+         *
+         * @var string
+         * @access protected
+         * @since 3.6.0
+         */
+        var $_show_split_view = true;
+
+        /**
</ins><span class="cx">          * Constructor - Call parent constructor with params array.
</span><span class="cx">          *
</span><span class="cx">          * This will set class properties based on the key value pairs in the array.
</span><span class="lines">@@ -70,6 +79,8 @@
</span><span class="cx">          */
</span><span class="cx">         function __construct( $params = array() ) {
</span><span class="cx">                 parent::__construct( $params );
</span><ins>+                if ( isset( $params[ 'show_split_view' ] ) )
+                        $this-&gt;_show_split_view = $params[ 'show_split_view' ];
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -98,7 +109,8 @@
</span><span class="cx">          * @return string
</span><span class="cx">          */
</span><span class="cx">         function addedLine( $line ) {
</span><del>-                return &quot;&lt;td&gt;+&lt;/td&gt;&lt;td class='diff-addedline'&gt;{$line}&lt;/td&gt;&quot;;
</del><ins>+                return &quot;&lt;td class='diff-addedline'&gt;{$line}&lt;/td&gt;&quot;;
+
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -108,7 +120,7 @@
</span><span class="cx">          * @return string
</span><span class="cx">          */
</span><span class="cx">         function deletedLine( $line ) {
</span><del>-                return &quot;&lt;td&gt;-&lt;/td&gt;&lt;td class='diff-deletedline'&gt;{$line}&lt;/td&gt;&quot;;
</del><ins>+                return &quot;&lt;td class='diff-deletedline'&gt;{$line}&lt;/td&gt;&quot;;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -118,7 +130,7 @@
</span><span class="cx">          * @return string
</span><span class="cx">          */
</span><span class="cx">         function contextLine( $line ) {
</span><del>-                return &quot;&lt;td&gt; &lt;/td&gt;&lt;td class='diff-context'&gt;{$line}&lt;/td&gt;&quot;;
</del><ins>+                return &quot;&lt;td class='diff-context'&gt;{$line}&lt;/td&gt;&quot;;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -127,7 +139,7 @@
</span><span class="cx">          * @return string
</span><span class="cx">          */
</span><span class="cx">         function emptyLine() {
</span><del>-                return '&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;';
</del><ins>+                return '&lt;td&gt;&amp;nbsp;&lt;/td&gt;';
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -142,8 +154,12 @@
</span><span class="cx">                 $r = '';
</span><span class="cx">                 foreach ($lines as $line) {
</span><span class="cx">                         if ( $encode )
</span><del>-                                $line = htmlspecialchars( $line );
-                        $r .= '&lt;tr&gt;' . $this-&gt;emptyLine() . $this-&gt;addedLine( $line ) . &quot;&lt;/tr&gt;\n&quot;;
</del><ins>+                                $line = wp_kses_post( $line );
+                        if ( $this-&gt;_show_split_view ) {
+                                $r .= '&lt;tr&gt;' . $this-&gt;emptyLine() . $this-&gt;emptyLine() . $this-&gt;addedLine( $line ) . &quot;&lt;/tr&gt;\n&quot;;
+                        } else {
+                                $r .= '&lt;tr&gt;' . $this-&gt;addedLine( $line ) . &quot;&lt;/tr&gt;\n&quot;;
+                        }
</ins><span class="cx">                 }
</span><span class="cx">                 return $r;
</span><span class="cx">         }
</span><span class="lines">@@ -160,8 +176,13 @@
</span><span class="cx">                 $r = '';
</span><span class="cx">                 foreach ($lines as $line) {
</span><span class="cx">                         if ( $encode )
</span><del>-                                $line = htmlspecialchars( $line );
-                        $r .= '&lt;tr&gt;' . $this-&gt;deletedLine( $line ) . $this-&gt;emptyLine() . &quot;&lt;/tr&gt;\n&quot;;
</del><ins>+                                $line = wp_kses_post( $line );
+                        if ( $this-&gt;_show_split_view ) {
+                                $r .= '&lt;tr&gt;' . $this-&gt;deletedLine( $line ) . $this-&gt;emptyLine() . $this-&gt;emptyLine() . &quot;&lt;/tr&gt;\n&quot;;
+                        } else {
+                                $r .= '&lt;tr&gt;' . $this-&gt;deletedLine( $line ) . &quot;&lt;/tr&gt;\n&quot;;
+                        }
+
</ins><span class="cx">                 }
</span><span class="cx">                 return $r;
</span><span class="cx">         }
</span><span class="lines">@@ -178,9 +199,12 @@
</span><span class="cx">                 $r = '';
</span><span class="cx">                 foreach ($lines as $line) {
</span><span class="cx">                         if ( $encode )
</span><del>-                                $line = htmlspecialchars( $line );
-                        $r .= '&lt;tr&gt;' .
-                                $this-&gt;contextLine( $line ) . $this-&gt;contextLine( $line ) . &quot;&lt;/tr&gt;\n&quot;;
</del><ins>+                                $line = wp_kses_post( $line );
+                        if (  $this-&gt;_show_split_view ) {
+                                $r .= '&lt;tr&gt;' . $this-&gt;contextLine( $line ) . $this-&gt;emptyLine() . $this-&gt;contextLine( $line )  . &quot;&lt;/tr&gt;\n&quot;;
+                        } else {
+                                $r .= '&lt;tr&gt;' . $this-&gt;contextLine( $line ) . &quot;&lt;/tr&gt;\n&quot;;
+                        }
</ins><span class="cx">                 }
</span><span class="cx">                 return $r;
</span><span class="cx">         }
</span><span class="lines">@@ -264,7 +288,11 @@
</span><span class="cx">                         } elseif ( $final_rows[$row] &lt; 0 ) { // Final is blank. This is really a deleted row.
</span><span class="cx">                                 $r .= $this-&gt;_deleted( array($orig_line), false );
</span><span class="cx">                         } else { // A true changed row.
</span><del>-                                $r .= '&lt;tr&gt;' . $this-&gt;deletedLine( $orig_line ) . $this-&gt;addedLine( $final_line ) . &quot;&lt;/tr&gt;\n&quot;;
</del><ins>+                                if ( $this-&gt;_show_split_view ) {
+                                        $r .= '&lt;tr&gt;' . $this-&gt;deletedLine( $orig_line ) . $this-&gt;emptyLine() . $this-&gt;addedLine( $final_line ) . &quot;&lt;/tr&gt;\n&quot;;
+                                } else {
+                                        $r .= '&lt;tr&gt;' . $this-&gt;deletedLine( $orig_line ) . &quot;&lt;/tr&gt;&lt;tr&gt;&quot; . $this-&gt;addedLine( $final_line ) . &quot;&lt;/tr&gt;\n&quot;;
+                                }
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>