Ticket #23901: 23901.6.diff
File 23901.6.diff, 2.4 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/ajax-actions.php
2186 2186 continue; 2187 2187 2188 2188 $revision_from_date_author = ''; 2189 $is_current_revision = false; 2189 2190 $count++; 2190 2191 // return blank data for diffs to the left of the left handle (for right handel model) 2191 2192 // or to the right of the right handle (for left handel model) … … 2235 2236 elseif ( wp_is_post_autosave( $left_revision ) ) 2236 2237 $revision_from_date_author = sprintf( $autosavef, $revision_from_date_author ); 2237 2238 2238 if ( $revision->post_modified === $post->post_modified ) 2239 if ( $revision->post_modified === $post->post_modified ) { 2239 2240 $revision_date_author = sprintf( $currentf, $revision_date_author ); 2240 elseif ( wp_is_post_autosave( $revision ) ) 2241 $is_current_revision = true; 2242 } elseif ( wp_is_post_autosave( $revision ) ) { 2241 2243 $revision_date_author = sprintf( $autosavef, $revision_date_author ); 2244 } 2242 2245 2243 2246 /* translators: revision date short format, see http://php.net/date */ 2244 2247 $date_short_format = _x( 'j M @ G:i', 'revision date short format'); … … 2275 2278 'titleTooltip' => $revision_date_author_short, 2276 2279 'restoreLink' => urldecode( $restore_link ), 2277 2280 'revision_toload' => true, 2278 'previous_revision_id' => $previous_revision_id 2281 'previous_revision_id' => $previous_revision_id, 2282 'is_current_revision' => $is_current_revision, 2279 2283 ); 2280 2284 } 2281 2285 $previous_revision_id = $revision->ID; -
wp-admin/js/revisions.js
633 633 this.toogleCompareTwoCheckbox(); 634 634 635 635 // hide the restore button when on the last sport/current post data 636 if ( Diff.rightDiff === Diff.revisions.length ){ 637 $( '#restore-revision' ).hide(); 638 } else { 639 $( '#restore-revision' ).show(); 640 } 636 $( '#restore-revision' ).toggle( ! Diff.revisions.at( Diff.rightDiff - 1 ).get( 'is_current_revision' ) ); 641 637 642 638 return this; 643 639 }, … … 703 699 lines_added: 0, 704 700 lines_deleted: 0, 705 701 scope_of_changes: 'none', 706 previous_revision_id: 0 702 previous_revision_id: 0, 703 is_current_revision: false 707 704 }, 708 705 709 706 url: function() {