get_previous_comments_link( string $label = '' ): string|void  Retrieves the link to the previous comments page.   Parameters   $label string Optional     Label for comments link text.   Default: ''     Return string|void HTML-formatted link for the previous page of comments.   Source  File: wp-includes/link-template.php. View all references  function get_previous_comments_link( $label = '' ) {
	if ( ! is_singular() ) {
		return;
	}

	$page = get_query_var( 'cpage' );

	if ( (int) $page <= 1 ) {
		return;
	}

	$prevpage = (int) $page - 1;

	if ( empty( $label ) ) {
		$label = __( '&laquo; Older Comments' );
	}

	/**
	 * Filters the anchor tag attributes for the previous comments page link.
	 *
	 * @since 2.7.0
	 *
	 * @param string $attributes Attributes for the anchor tag.
	 */
	return '<a href="' . esc_url( get_comments_pagenum_link( $prevpage ) ) . '" ' . apply_filters( 'previous_comments_link_attributes', '' ) . '>' . preg_replace( '/&([^#])(?![a-z]{1,8};)/i', '&#038;$1', $label ) . '</a>';
}
   Hooks     apply_filters( 'previous_comments_link_attributes', string $attributes )   
Filters the anchor tag attributes for the previous comments page link.      Related  Uses    Uses Description      is_singular() wp-includes/query.php   Determines whether the query is for an existing single post of any post type (post, attachment, page, custom post types).     get_query_var() wp-includes/query.php   Retrieves the value of a query variable in the WP_Query class.     get_comments_pagenum_link() wp-includes/link-template.php   Retrieves the comments page number link.     __() wp-includes/l10n.php   Retrieves the translation of $text.     esc_url() wp-includes/formatting.php   Checks and cleans a URL.     apply_filters() wp-includes/plugin.php   Calls the callback functions that have been added to a filter hook.   
   Used By    Used By Description      get_the_comments_navigation() wp-includes/link-template.php   Retrieves navigation to next/previous set of comments, when applicable.     previous_comments_link() wp-includes/link-template.php   Displays the link to the previous comments page.   
    Changelog    Version Description     2.7.1 Introduced.    

    
{'path': 'public/docs/wordpress/functions/get_previous_comments_link.html', 'source': 'DevDocs.IO'}