Ticket #20262: 20262.diff
| File 20262.diff, 908 bytes (added by , 14 years ago) |
|---|
-
wp-includes/comment.php
1972 1972 * @return object 1973 1973 */ 1974 1974 function _close_comments_for_old_posts( $posts, $query ) { 1975 if ( empty( $posts ) || ! $query->is_singular() || ! get_option( 'close_comments_for_old_posts' ) )1975 if ( empty( $posts ) || ! $query->is_singular() || ! get_option( 'close_comments_for_old_posts' ) || $posts[0]->post_status != 'publish' ) 1976 1976 return $posts; 1977 1977 1978 1978 $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) ); … … 2013 2013 return $open; 2014 2014 2015 2015 $post = get_post($post_id); 2016 2017 if( $post->post_status != 'publish' ) 2018 return $open; 2016 2019 2017 2020 $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) ); 2018 2021 if ( ! in_array( $post->post_type, $post_types ) )
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)