diff --git a/wp-includes/post.php b/wp-includes/post.php index 33f149a9af..949d990dd7 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2155,6 +2155,10 @@ function wp_insert_post($postarr = array(), $wp_error = false) { $now = gmdate('Y-m-d H:i:59'); if ( mysql2date('U', $post_date_gmt, false) > mysql2date('U', $now, false) ) $post_status = 'future'; + } elseif( 'future' == $post_status ) { + $now = gmdate('Y-m-d H:i:59'); + if ( mysql2date('U', $post_date_gmt, false) <= mysql2date('U', $now, false) ) + $post_status = 'publish'; } if ( empty($comment_status) ) {