Changeset 24730
- Timestamp:
- 07/18/2013 02:10:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/revision.php
r24726 r24730 117 117 } 118 118 119 $autosave = wp_is_post_autosave( $revision ); 120 $current = ! $autosave && $revision->post_modified_gmt === $post->post_modified_gmt; 121 if ( $current && ! empty( $current_id ) ) { 122 if ( $current_id < $revision->ID ) { 123 $revisions[ $current_id ]['current'] = false; 124 $current_id = $revision->ID; 125 } else { 126 $current = false; 127 } 128 } elseif ( $current ) { 129 $current_id = $revision->ID; 130 } 131 119 132 $revisions[ $revision->ID ] = array( 120 133 'id' => $revision->ID, … … 124 137 'dateShort' => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), $modified ), 125 138 'timeAgo' => sprintf( __( '%s ago' ), human_time_diff( $modified_gmt, $now_gmt ) ), 126 'autosave' => wp_is_post_autosave( $revision ),127 'current' => $ revision->post_modified_gmt === $post->post_modified_gmt,139 'autosave' => $autosave, 140 'current' => $current, 128 141 'restoreUrl' => urldecode( $restore_link ), 129 142 );
Note: See TracChangeset
for help on using the changeset viewer.