Ticket #18109: 18109.diff
File 18109.diff, 1.6 KB (added by , 14 years ago) |
---|
-
wp-includes/comment.php
1959 1959 * @since 2.7.0 1960 1960 * 1961 1961 * @param object $posts Post data object. 1962 * @param object $query Query object. 1962 1963 * @return object 1963 1964 */ 1964 function _close_comments_for_old_posts( $posts ) {1965 if ( empty($posts) || ! is_singular() || !get_option('close_comments_for_old_posts') )1965 function _close_comments_for_old_posts( $posts, $query ) { 1966 if ( empty($posts) || !$query->is_singular() || !get_option('close_comments_for_old_posts') ) 1966 1967 return $posts; 1967 1968 1968 1969 $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) ); -
wp-includes/default-filters.php
189 189 add_filter( 'comment_email', 'antispambot' ); 190 190 add_filter( 'option_tag_base', '_wp_filter_taxonomy_base' ); 191 191 add_filter( 'option_category_base', '_wp_filter_taxonomy_base' ); 192 add_filter( 'the_posts', '_close_comments_for_old_posts' 192 add_filter( 'the_posts', '_close_comments_for_old_posts', 10, 2 ); 193 193 add_filter( 'comments_open', '_close_comments_for_old_post', 10, 2 ); 194 194 add_filter( 'pings_open', '_close_comments_for_old_post', 10, 2 ); 195 195 add_filter( 'editable_slug', 'urldecode' );