Ticket #23901: 23901-9.patch
File 23901-9.patch, 2.3 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/ajax-actions.php
2129 2129 $left_revision = get_post( $post_id ); 2130 2130 2131 2131 // 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->post_date < $left_revision->post_date ) { 2133 2133 $temp = $left_revision; 2134 2134 $left_revision = $right_revision; 2135 2135 $right_revision = $temp; -
wp-includes/post-template.php
1387 1387 * 1388 1388 * Second argument controls parameters: 1389 1389 * (bool) parent : include the parent (the "Current Revision") in the list. 1390 * Deprecated (ignored), since 3.6 the revisions always include 1391 * a copy of the current post. 1390 1392 * (string) format : 'list' or 'form-table'. 'list' outputs UL, 'form-table' 1391 1393 * outputs TABLE with UI. 1392 1394 * (int) right : what revision is currently being viewed - used in … … 1413 1415 if ( !$post = get_post( $post_id ) ) 1414 1416 return; 1415 1417 1416 $defaults = array( ' parent' => false, 'right' => false, 'left' => false, 'format' => 'list', 'type' => 'all' );1418 $defaults = array( 'right' => false, 'left' => false, 'format' => 'list', 'type' => 'all' ); 1417 1419 extract( wp_parse_args( $args, $defaults ), EXTR_SKIP ); 1418 1420 1419 1421 if ( !$revisions = wp_get_post_revisions( $post->ID ) ) … … 1422 1424 /* translators: post revision: 1: when, 2: author name */ 1423 1425 $titlef = _x( '%1$s', 'post revision' ); 1424 1426 1425 // Since 3.6 revisions include a copy of the current post data as a revision.1426 // The following removes that revision when $parent == false1427 $parent_included = _wp_get_post_revision_version( reset( $revisions ) ) > 0;1428 if ( $parent_included && ! $parent )1429 array_shift( $revisions );1430 elseif ( ! $parent_included && $parent )1431 array_unshift( $revisions, $post );1432 1433 1427 $rows = $right_checked = ''; 1434 1428 $class = false; 1435 1429 $can_edit_post = current_user_can( 'edit_post', $post->ID );