Ticket #46671: 46671.4.diff
File 46671.4.diff, 744 bytes (added by , 4 years ago) |
---|
-
src/wp-admin/revision.php
60 60 61 61 check_admin_referer( "restore-post_{$revision->ID}" ); 62 62 63 /* 64 * Ensure the global $post remains the same after the revision is restored. 65 * Because wp_insert_post() and wp_transition_post_status() are called 66 * during the process, plugins can unexpectedly modify $post. 67 */ 68 $backup_global_post = clone $post; 69 63 70 wp_restore_post_revision( $revision->ID ); 64 71 72 // Restore the global $post as it was before. 73 $post = $backup_global_post; 74 65 75 $redirect = add_query_arg( 66 76 array( 67 77 'message' => 5,