Changeset 48625 for trunk/src/wp-admin/revision.php
- Timestamp:
- 07/26/2020 09:24:00 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/revision.php
r48624 r48625 61 61 check_admin_referer( "restore-post_{$revision->ID}" ); 62 62 63 /* 64 * Ensure the global $post remains the same after 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 ); 71 72 // Restore the global $post as it was before. 73 $post = $backup_global_post; 64 74 65 75 $redirect = add_query_arg(
Note: See TracChangeset
for help on using the changeset viewer.