Fix comment display when paging is off. see #7769
git-svn-id: http://svn.automattic.com/wordpress/trunk@8964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c441d1d00d
commit
ea3363cd24
|
@ -1012,9 +1012,10 @@ class Walker {
|
|||
}
|
||||
|
||||
$total_top = count( $top_level_elements );
|
||||
|
||||
if ( $paging )
|
||||
$this->max_pages = ceil($total_top / $per_page);
|
||||
else
|
||||
$end = $total_top;
|
||||
|
||||
foreach( $top_level_elements as $e ){
|
||||
$count++;
|
||||
|
|
|
@ -1015,6 +1015,7 @@ function wp_list_comments($args = array(), $comments = null ) {
|
|||
$r['per_page'] = get_query_var('comments_per_page');
|
||||
|
||||
if ( empty($r['per_page']) ) {
|
||||
$r['per_page'] = 0;
|
||||
$r['page'] = 0;
|
||||
} else {
|
||||
$r['page'] = intval($r['page']);
|
||||
|
|
Loading…
Reference in New Issue