@@ 44-47 (lines=4) @@ | ||
41 | break; |
|
42 | ||
43 | // Restore if revisions are enabled or this is an autosave. |
|
44 | if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) { |
|
45 | $redirect = 'edit.php?post_type=' . $post->post_type; |
|
46 | break; |
|
47 | } |
|
48 | ||
49 | // Don't allow revision restore when post is locked |
|
50 | if ( wp_check_post_lock( $post->ID ) ) |
|
@@ 70-73 (lines=4) @@ | ||
67 | break; |
|
68 | ||
69 | // Revisions disabled and we're not looking at an autosave |
|
70 | if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) { |
|
71 | $redirect = 'edit.php?post_type=' . $post->post_type; |
|
72 | break; |
|
73 | } |
|
74 | ||
75 | $post_edit_link = get_edit_post_link(); |
|
76 | $post_title = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>'; |