From 4fb1a0a76bdedc275ebbc89f7c75a9490d69087d Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 12 Dec 2008 20:08:49 +0000 Subject: [PATCH] Fix comment links when displaying first page of comments. Props johnconners. fixes #8583 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@10196 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 31b5d9b368..06d5091f13 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -833,8 +833,8 @@ function comments_template( $file = '/comments.php', $separate_comments = false } $overridden_cpage = FALSE; - if ( '' == get_query_var('cpage') && get_option('page_comments') && 'newest' == get_option('default_comments_page') ) { - set_query_var( 'cpage', get_comment_pages_count() ); + if ( '' == get_query_var('cpage') && get_option('page_comments') ) { + set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 ); $overridden_cpage = TRUE; }