Ticket #26042: revisions.php.patch
File revisions.php.patch, 891 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/revision.php
91 91 // they are different, unless a plugin tells us to always save regardless. 92 92 // If no previous revisions, save one 93 93 if ( $revisions = wp_get_post_revisions( $post_id ) ) { 94 // grab the last revision, but not an autosave 95 foreach ( $revisions as $revision ) { 96 if ( false !== strpos( $revision->post_name, "{$revision->post_parent}-revision" ) ) { 97 $last_revision = $revision; 98 break; 99 } 100 } 94 // revisions are ordered so lets grab the last one 95 $last_revision = array_pop($revisions); 101 96 102 97 if ( isset( $last_revision ) && apply_filters( 'wp_save_post_revision_check_for_changes', true, $last_revision, $post ) ) { 103 98 $post_has_changed = false;