Skip to content

Commit 7bc3ebf

Browse files
committed
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
1 parent d41c30b commit 7bc3ebf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/wp-includes/comment.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,9 @@ function get_comment_pages_count( $comments = null, $per_page = null, $threaded
789789
if ( empty($comments) )
790790
return 0;
791791

792+
if ( ! get_option( 'page_comments' ) )
793+
return 1;
794+
792795
if ( !isset($per_page) )
793796
$per_page = (int) get_query_var('comments_per_page');
794797
if ( 0 === $per_page )

0 commit comments

Comments
 (0)