Make WordPress Core

Ticket #16090: 16090.3.diff

File 16090.3.diff, 831 bytes (added by johnjamesjacoby, 14 years ago)

Fix missing parenthesis in 16090.diff

  • wp-includes/comment.php

     
    19651965        if ( empty($posts) || !is_singular() || !get_option('close_comments_for_old_posts') )
    19661966                return $posts;
    19671967
     1968        $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
     1969        if ( ! in_array( $posts[0]->post_type, $post_types ) )
     1970                return $posts;
     1971
    19681972        $days_old = (int) get_option('close_comments_days_old');
    19691973        if ( !$days_old )
    19701974                return $posts;
     
    20002004
    20012005        $post = get_post($post_id);
    20022006
     2007        $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
     2008        if ( ! in_array( $post->post_type, $post_types ) )
     2009                return $open;
     2010
    20032011        if ( time() - strtotime( $post->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) )
    20042012                return false;
    20052013