Make WordPress Core

Ticket #23901: 23901.7.diff

File 23901.7.diff, 1.3 KB (added by adamsilverstein, 12 years ago)

use date not ID for left->right compare; show all revisions in post meta box including most current;

  • wp-includes/post-template.php

     
    14231423        $titlef = _x( '%1$s', 'post revision' );
    14241424
    14251425        // Since 3.6 revisions include a copy of the current post data as a revision.
    1426         // The following removes that revision when $parent == false
     1426        // The following adds that revision when $parent == true
    14271427        $parent_included = _wp_get_post_revision_version( reset( $revisions ) ) > 0;
    1428         if ( $parent_included && ! $parent )
    1429                 array_shift( $revisions );
    1430         elseif ( ! $parent_included && $parent )
     1428        if ( ! $parent_included && $parent )
    14311429                array_unshift( $revisions, $post );
    14321430
    14331431        $rows = $right_checked = '';
  • wp-admin/includes/ajax-actions.php

     
    21292129                        $left_revision = get_post( $post_id );
    21302130
    21312131                // make sure the right revision is the most recent
    2132                 if ( $compare_two_mode && $right_revision->ID < $left_revision->ID ) {
     2132                if ( $compare_two_mode && $right_revision->date < $left_revision->date ) {
    21332133                        $temp = $left_revision;
    21342134                        $left_revision = $right_revision;
    21352135                        $right_revision = $temp;