wp/wp-includes/blocks/comments-pagination-previous.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
    27 	$filter_link_attributes = static function () {
    27 	$filter_link_attributes = static function () {
    28 		return get_block_wrapper_attributes();
    28 		return get_block_wrapper_attributes();
    29 	};
    29 	};
    30 	add_filter( 'previous_comments_link_attributes', $filter_link_attributes );
    30 	add_filter( 'previous_comments_link_attributes', $filter_link_attributes );
    31 
    31 
    32 	$previous_comments_link = get_previous_comments_link( $label );
    32 	$comment_vars           = build_comment_query_vars_from_block( $block );
       
    33 	$previous_comments_link = get_previous_comments_link( $label, $comment_vars['paged'] ?? null );
    33 
    34 
    34 	remove_filter( 'previous_comments_link_attributes', $filter_link_attributes );
    35 	remove_filter( 'previous_comments_link_attributes', $filter_link_attributes );
    35 
    36 
    36 	if ( ! isset( $previous_comments_link ) ) {
    37 	if ( ! isset( $previous_comments_link ) ) {
    37 		return '';
    38 		return '';