Close comments for old posts, pages, and attachments, not just posts. Props mrmist. fixes #8740

git-svn-id: https://develop.svn.wordpress.org/trunk@10273 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-12-30 20:09:40 +00:00
parent f04a7d1efa
commit 00f96adf85

View File

@ -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');