Summery Summery
Retrieves the link to the previous comments page.
Syntax Syntax
Parameters Parameters
- $label
-
(Optional) Label for comments link text.
Default value: ''
Return Return
(string|void) HTML-formatted link for the previous page of comments.
Source Source
File: wp-includes/link-template.php
*/ function next_comments_link( $label = '', $max_page = 0 ) { echo get_next_comments_link( $label, $max_page ); } /** * Retrieves the link to the previous comments page. * * @since 2.7.1 * * @param string $label Optional. Label for comments link text. Default empty. * @return string|void HTML-formatted link for the previous page of comments. */ function get_previous_comments_link( $label = '' ) { if ( ! is_singular() ) { return; } $page = get_query_var( 'cpage' ); if ( intval( $page ) <= 1 ) { return; } $prevpage = intval( $page ) - 1;
Advertisement
Changelog Changelog
Version | Description |
---|---|
2.7.1 | Introduced. |