mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
In get_next_comments_link(), ensure proper pagination when no 'cpage' query var is found.
The 'cpage' query var is only set when using `comments_template()` to display comments. If displaying them in a context where 'cpage' is not yet set, the default value should be 1, not 0. Props MomDad, couturefreak. Fixes #20319. git-svn-id: https://develop.svn.wordpress.org/trunk@31617 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2466,6 +2466,10 @@ function get_next_comments_link( $label = '', $max_page = 0 ) {
|
||||
|
||||
$page = get_query_var('cpage');
|
||||
|
||||
if ( ! $page ) {
|
||||
$page = 1;
|
||||
}
|
||||
|
||||
$nextpage = intval($page) + 1;
|
||||
|
||||
if ( empty($max_page) )
|
||||
|
||||
Reference in New Issue
Block a user