Changeset 18836
- Timestamp:
- 09/30/2011 03:35:50 PM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r18087 r18836 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 … … 1970 1971 return $posts; 1971 1972 1972 $days_old = (int) get_option( 'close_comments_days_old');1973 if ( ! $days_old )1973 $days_old = (int) get_option( 'close_comments_days_old' ); 1974 if ( ! $days_old ) 1974 1975 return $posts; 1975 1976 -
trunk/wp-includes/default-filters.php
r18809 r18836 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 );
Note: See TracChangeset
for help on using the changeset viewer.