wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
get_comments_pagenum_link › WordPress Function
Seit2.7.0
Veraltetn/v
› get_comments_pagenum_link ( $pagenum = 1, $max_page = 0 )
Parameter: (2) |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Retrieves the comments page number link.
Ähnliche Funktionen: get_comments_link, get_comment_author_link, get_pagenum_link, get_comment_link, get_comment_reply_link
Quellcode
function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) { global $wp_rewrite; $pagenum = (int) $pagenum; $max_page = (int) $max_page; $result = get_permalink(); if ( 'newest' === get_option( 'default_comments_page' ) ) { if ( $pagenum !== $max_page ) { if ( $wp_rewrite->using_permalinks() ) { $result = user_trailingslashit( trailingslashit( $result ) . $wp_rewrite->comments_pagination_base . '-' . $pagenum, 'commentpaged' ); } else { $result = add_query_arg( 'cpage', $pagenum, $result ); } } } elseif ( $pagenum > 1 ) { if ( $wp_rewrite->using_permalinks() ) { $result = user_trailingslashit( trailingslashit( $result ) . $wp_rewrite->comments_pagination_base . '-' . $pagenum, 'commentpaged' ); } else { $result = add_query_arg( 'cpage', $pagenum, $result ); } } $result .= '#comments'; /** * Filters the comments page number link for the current request. * * @since 2.7.0 * * @param string $result The comments page number link. */ return apply_filters( 'get_comments_pagenum_link', $result ); }