WordPress开发者和主题制作者的搜索引擎



get_next_posts_page_link ›

Since2.0.10
已弃用n/a
get_next_posts_page_link ( $max_page = 0 )
参数:
  • (int) $max_page Optional. Max pages. Default 0.
    Required: No
    默认:
返回:
  • (string|void) The link URL for next posts page.
定义在:
文档:

Retrieves the next posts page link.

Backported from 2.1.3 to 2.0.10.



源码

function get_next_posts_page_link( $max_page = 0 ) {
	global $paged;

	if ( ! is_single() ) {
		if ( ! $paged ) {
			$paged = 1;
		}
		$nextpage = intval( $paged ) + 1;
		if ( ! $max_page || $max_page >= $nextpage ) {
			return get_pagenum_link( $nextpage );
		}
	}
}