diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 37ab30721d..f8a478dfd9 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -668,6 +668,15 @@ function bulk_edit_posts( $post_data = null ) { // Prevent wp_insert_post() from overwriting post format with the old data. unset( $post_data['tax_input']['post_format'] ); + // Reset post date of scheduled post to be published. + if ( + in_array( $post->post_status, array( 'future', 'draft' ), true ) && + 'publish' === $post_data['post_status'] + ) { + $post_data['post_date'] = current_time( 'mysql' ); + $post_data['post_date_gmt'] = ''; + } + $post_id = wp_update_post( $post_data ); update_post_meta( $post_id, '_edit_last', get_current_user_id() ); $updated[] = $post_id; diff --git a/wp-includes/version.php b/wp-includes/version.php index 24b950cf0b..2a2c19c88a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-beta2-56122'; +$wp_version = '6.3-beta2-56123'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.