From 7bc3ebf033f85fbd627e7b9af27260de3f453349 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 26 Aug 2013 18:51:53 +0000 Subject: [PATCH] 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 --- src/wp-includes/comment.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 312f384a79..bf004462ae 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -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 )