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
This commit is contained in:
ryan 2008-12-12 20:08:49 +00:00
parent 9bdf2f30b9
commit 4fb1a0a76b

View File

@ -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;
}