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



previous_posts ›

Since0.71
已弃用n/a
previous_posts ( $echo = true )
参数:
  • (bool) $echo Optional. Whether to echo the link. Default true.
    Required: No
    默认: true
返回:
  • (string|void) The previous posts page link if `$echo = false`.
定义在:
文档:

Displays or retrieves the previous posts page link.



源码

function previous_posts( $echo = true ) {
	$output = esc_url( get_previous_posts_page_link() );

	if ( $echo ) {
		echo $output;
	} else {
		return $output;
	}
}