函数原型
previous_posts( bool $echo = true ): string|void
函数描述
Displays or retrieves the previous posts page link.
是否弃用
未弃用
函数参数
-
$echo
bool
Optional - Whether to echo the link.
Default:
true
函数返回值
string|void The previous posts page link if $echo = false.
函数位置
File: wp-includes/link-template.php.
函数源码
function previous_posts( $echo = true ) {
$output = esc_url( get_previous_posts_page_link() );
if ( $echo ) {
echo $output;
} else {
return $output;
}
}
源码链接
变更日志
| Version | Description |
|---|---|
| 0.71 | Introduced. |

