Return 1 from get_comment_pages_count() when pagination is disabled.

props obenland.
fixes #17778.


git-svn-id: https://develop.svn.wordpress.org/trunk@25126 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-08-26 18:51:53 +00:00
parent d41c30be7a
commit 7bc3ebf033
1 changed files with 3 additions and 0 deletions

View File

@ -789,6 +789,9 @@ function get_comment_pages_count( $comments = null, $per_page = null, $threaded
if ( empty($comments) )
return 0;
if ( ! get_option( 'page_comments' ) )
return 1;
if ( !isset($per_page) )
$per_page = (int) get_query_var('comments_per_page');
if ( 0 === $per_page )