get_next_posts_page_link

函数


get_next_posts_page_link ( $max_page = 0 )
参数
  • (int)
    $max_page
    Optional. Max pages. Default 0.
    Required:
返回值
  • (string|void) The link URL for next posts page.
定义位置
  • wp-includes/link-template.php
    , line 2440
引入
2.0.10
弃用

检索下一个文章的页面链接。

从2.1.3回传到2.0.10。

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

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