From 5a6b76973ff7e40e530620fe0afa358e3e38b4d4 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 30 Dec 2008 20:10:15 +0000 Subject: [PATCH] Close comments for old posts, pages, and attachments, not just posts. Props mrmist. fixes #8740 for 2.7 git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10274 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index e2dfa18b8a..60692106b1 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -1580,7 +1580,7 @@ function update_comment_cache($comments) { * @return object */ function _close_comments_for_old_posts( $posts ) { - if ( empty($posts) || !is_single() || !get_option('close_comments_for_old_posts') ) + if ( empty($posts) || !is_singular() || !get_option('close_comments_for_old_posts') ) return $posts; $days_old = (int) get_option('close_comments_days_old');