get_comments_pagenum_link [ WordPress Function ]
get_comments_pagenum_link ( $pagenum = 1, $max_page = 0 )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_comments_link, get_comment_author_link, get_pagenum_link, get_comment_link, get_comment_reply_link
Retrieve comments page number link.
Source
<?php
function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
global $post, $wp_rewrite;
$pagenum = (int) $pagenum;
$result = get_permalink( $post->ID );
if ( 'newest' == get_option('default_comments_page') ) {
if ( $pagenum != $max_page ) {
if ( $wp_rewrite->using_permalinks() )
$result = user_trailingslashit( trailingslashit($result) . 'comment-page-' . $pagenum, 'commentpaged');
else
$result = add_query_arg( 'cpage', $pagenum, $result );
}
} elseif ( $pagenum > 1 ) {
if ( $wp_rewrite->using_permalinks() )
$result = user_trailingslashit( trailingslashit($result) . 'comment-page-' . $pagenum, 'commentpaged');
else
$result = add_query_arg( 'cpage', $pagenum, $result );
}
$result .= '#comments';
$result = apply_filters('get_comments_pagenum_link', $result);
return $result;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- WordPress › Support » add_filter for get_comments_pagenum_link
I'm using add_filter on get_comments_pagenum_link in functions.php to make a modification but I can't get it to work properly. Below is the unmodified code with ...
wordpress.org - get_comments_pagenum_link() WordPress function reference ...
Signature. get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ). pagenum: (int) Optional. Page number. Default: 1; max_page: Default: 0 ...
queryposts.com - Changing the comments link produced by the get_comments_link ...
Dec 20, 2010 ... So the solution to the get_comments_pagenum_link() function is ... Which filters the output of get_comments_pagenum_link() to replace ...
wordpress.stackexchange.com - get_comments_pagenum_link | A HitchHackers guide through ...
Feb 12, 2011 ... function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) { global $post, $wp_rewrite; $pagenum = (int) $pagenum; $result ...
hitchhackerguide.com