mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Make sure the first revision is seen as coming from emptiness, so it can be restored.
props adamsilverstein. fixes #23898. git-svn-id: https://develop.svn.wordpress.org/trunk@23872 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1426,7 +1426,7 @@ function wp_list_post_revisions( $post_id = 0, $args = null ) {
|
||||
// The following removes that revision when $parent == false
|
||||
$parent_included = _wp_last_revision_matches_current_post( $post_id );
|
||||
if ( $parent_included && ! $parent )
|
||||
array_pop( $revisions );
|
||||
array_shift( $revisions );
|
||||
elseif ( ! $parent_included && $parent )
|
||||
array_unshift( $revisions, $post );
|
||||
|
||||
@@ -1436,7 +1436,7 @@ function wp_list_post_revisions( $post_id = 0, $args = null ) {
|
||||
foreach ( $revisions as $revision ) {
|
||||
if ( !current_user_can( 'read_post', $revision->ID ) )
|
||||
continue;
|
||||
|
||||
|
||||
$is_autosave = wp_is_post_autosave( $revision );
|
||||
if ( ( 'revision' === $type && $is_autosave ) || ( 'autosave' === $type && ! $is_autosave ) )
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user