mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
Revisions: Correct check for ensuring comparison always from newer to older revision. props adamsilverstein. fixes #24340.
git-svn-id: https://develop.svn.wordpress.org/trunk@24263 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2b2c46e79f
commit
a5ab9e5dca
@ -2134,8 +2134,8 @@ function wp_ajax_revisions_data() {
|
||||
if ( ! $compare_to )
|
||||
$left_revision = get_post( $post_id );
|
||||
|
||||
// make sure the right revision is the most recent
|
||||
if ( $compare_two_mode && $right_revision->post_date < $left_revision->post_date ) {
|
||||
// make sure the right revision is the most recent, except on oldest revision
|
||||
if ( $compare_to && $right_revision->post_date < $left_revision->post_date ) {
|
||||
$temp = $left_revision;
|
||||
$left_revision = $right_revision;
|
||||
$right_revision = $temp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user