Ticket #19858: 19858.diff
File 19858.diff, 896 bytes (added by , 13 years ago) |
---|
-
wp-includes/comment.php
1978 1978 if ( empty( $posts ) || ! $query->is_singular() || ! get_option( 'close_comments_for_old_posts' ) ) 1979 1979 return $posts; 1980 1980 1981 $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );1981 $post_types = apply_filters( 'close_comments_for_post_types', array( 'post', 'attachment' ) ); 1982 1982 if ( ! in_array( $posts[0]->post_type, $post_types ) ) 1983 1983 return $posts; 1984 1984 … … 2017 2017 2018 2018 $post = get_post($post_id); 2019 2019 2020 $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );2020 $post_types = apply_filters( 'close_comments_for_post_types', array( 'post', 'attachment' ) ); 2021 2021 if ( ! in_array( $post->post_type, $post_types ) ) 2022 2022 return $open; 2023 2023