函数原型
get_next_posts_page_link( int $max_page ): string|void
函数描述
Retrieves the next posts page link.
是否弃用
未弃用
函数参数
-
$max_page
int
Optional - Max pages. Default 0.
函数返回值
string|void The link URL for next posts page.
函数位置
File: wp-includes/link-template.php.
函数源码
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 );
}
}
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.0.10 | Introduced. |

