Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <<NEXT [SELECT] PREV>>
- <option value="link/page1">Page 1</option>
- <option value="link/page2">Page 2</option>
- function yorumlariSayfala ( $args = array() ) {
- global $wp_rewrite;
- if ( ! is_singular() )
- return;
- $page = get_query_var('cpage');
- if ( !$page )
- $page = 1;
- $max_page = get_comment_pages_count();
- $defaults = array(
- 'base' => add_query_arg( 'cpage', '%#%' ),
- 'format' => '',
- 'total' => $max_page,
- 'current' => $page,
- 'echo' => true,
- );
- if ( $wp_rewrite->using_permalinks() )
- $defaults['base'] = user_trailingslashit(trailingslashit(get_permalink()) . $wp_rewrite->comments_pagination_base . '-%#%', 'commentpaged');
- $args = wp_parse_args( $args, $defaults );
- $page_links = paginate_links( $args );
- if ( $args['echo'] )
- echo $page_links;
- else
- return $page_links;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement