diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index 0df44a80ed..171634d005 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -552,6 +552,9 @@ function upgrade_all() { if ( $wp_current_db_version < 36686 ) upgrade_450(); + if ( $wp_current_db_version < 37854 ) + upgrade_460(); + maybe_disable_link_manager(); maybe_disable_automattic_widgets(); @@ -1687,6 +1690,19 @@ function upgrade_450() { delete_user_setting( 'wplink' ); } +/** + * Executes changes made in WordPress 4.6.0. + * + * @ignore + * @since 4.6.0 + * + * @global int $wp_current_db_version Current database version. + * @global wpdb $wpdb WordPress database abstraction object. + */ +function upgrade_460() { + delete_post_meta_by_key( '_post_restored_from' ); +} + /** * Executes network-level upgrade routines. * diff --git a/src/wp-includes/revision.php b/src/wp-includes/revision.php index da16d174dd..e9de983101 100644 --- a/src/wp-includes/revision.php +++ b/src/wp-includes/revision.php @@ -378,14 +378,6 @@ function wp_restore_post_revision( $revision_id, $fields = null ) { if ( ! $post_id || is_wp_error( $post_id ) ) return $post_id; - // Add restore from details - $restore_details = array( - 'restored_revision_id' => $revision_id, - 'restored_by_user' => get_current_user_id(), - 'restored_time' => time() - ); - update_post_meta( $post_id, '_post_restored_from', $restore_details ); - // Update last edit user update_post_meta( $post_id, '_edit_last', get_current_user_id() ); diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index b1b15cb06f..5fbd770600 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -11,7 +11,7 @@ $wp_version = '4.6-alpha-37847-src'; * * @global int $wp_db_version */ -$wp_db_version = 36686; +$wp_db_version = 37854; /** * Holds the TinyMCE version