WordPress.org

Make WordPress Core

Ticket #20262: 20262.4.diff

File 20262.4.diff, 538 bytes (added by nacin, 5 years ago)
  • src/wp-includes/comment.php

     
    31043104        if ( ! in_array( $post->post_type, $post_types ) )
    31053105                return $open;
    31063106
     3107        // Undated drafts should not show up as comments closed.
     3108        if ( $post->post_date_gmt === '0000-00-00 00:00:00' ) {
     3109                return $open;
     3110        }
     3111
    31073112        if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) )
    31083113                return false;
    31093114