// If we could get a lock, re-"add" the option to fire all the correct filters.
update_option( $lock,
$now );
reset( $revisions );
$add_last = true;
do { $this_revision =
current( $revisions );
$prev_revision =
next( $revisions );
$this_revision_version =
_wp_get_post_revision_version( $this_revision );
// Something terrible happened.
if ( false ===
$this_revision_version ) { continue;
} /*
* 1 is the latest revision version, so we're already up to date.
* No need to add a copy of the post as latest revision.
*/
if ( 0 <
$this_revision_version ) {