Skip to content

Commit

Permalink
Pass the comments query paged arg to functions (#63698)
Browse files Browse the repository at this point in the history
Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org>
Co-authored-by: ockham <bernhard-reiter@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
  • Loading branch information
4 people authored Sep 16, 2024
1 parent ea0ea78 commit d9e3075
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function render_block_core_comments_pagination_next( $attributes, $content, $blo
$label .= $pagination_arrow;
}

$next_comments_link = get_next_comments_link( $label, $max_page );
$next_comments_link = get_next_comments_link( $label, $max_page, $comment_vars['paged'] );

remove_filter( 'next_posts_link_attributes', $filter_link_attributes );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ function render_block_core_comments_pagination_previous( $attributes, $content,
};
add_filter( 'previous_comments_link_attributes', $filter_link_attributes );

$previous_comments_link = get_previous_comments_link( $label );
$comment_vars = build_comment_query_vars_from_block( $block );
$previous_comments_link = get_previous_comments_link( $label, $comment_vars['paged'] );

remove_filter( 'previous_comments_link_attributes', $filter_link_attributes );

Expand Down

0 comments on commit d9e3075

Please sign in to comment.