diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 21020649c1..6da6601931 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -2005,7 +2005,7 @@ function wp_create_post_autosave( $post_data ) { } /** - * Autosave the revisioned meta fields. + * Autosaves the revisioned meta fields. * * Iterates through the revisioned meta fields and checks each to see if they are set, * and have a changed value. If so, the meta value is saved and attached to the autosave. @@ -2027,15 +2027,14 @@ function wp_autosave_post_revisioned_meta_fields( $new_autosave ) { $post_type = get_post_type( $new_autosave['post_parent'] ); /* - * Go thru the revisioned meta keys and save them as part of the autosave, if - * the meta key is part of the posted data, the meta value is not blank and - * the the meta value has changes from the last autosaved value. + * Go through the revisioned meta keys and save them as part of the autosave, + * if the meta key is part of the posted data, the meta value is not blank, + * and the meta value has changes from the last autosaved value. */ foreach ( wp_post_revision_meta_keys( $post_type ) as $meta_key ) { - if ( - isset( $posted_data[ $meta_key ] ) && - get_post_meta( $new_autosave['ID'], $meta_key, true ) !== wp_unslash( $posted_data[ $meta_key ] ) + if ( isset( $posted_data[ $meta_key ] ) + && get_post_meta( $new_autosave['ID'], $meta_key, true ) !== wp_unslash( $posted_data[ $meta_key ] ) ) { /* * Use the underlying delete_metadata() and add_metadata() functions @@ -2044,13 +2043,9 @@ function wp_autosave_post_revisioned_meta_fields( $new_autosave ) { */ delete_metadata( 'post', $new_autosave['ID'], $meta_key ); - /* - * One last check to ensure meta value not empty(). - */ + // One last check to ensure meta value is not empty. if ( ! empty( $posted_data[ $meta_key ] ) ) { - /* - * Add the revisions meta data to the autosave. - */ + // Add the revisions meta data to the autosave. add_metadata( 'post', $new_autosave['ID'], $meta_key, $posted_data[ $meta_key ] ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 2f71dce929..46dfdbd7cf 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-58960'; +$wp_version = '6.7-alpha-58961'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.