函数文档

previous_comments_link()

💡 云策文档标注

概述

previous_comments_link() 函数用于在 WordPress 中显示指向上一页评论的链接。它基于 get_previous_comments_link() 函数实现,适用于分页评论场景。

关键要点

  • 函数功能:输出上一页评论的链接,常用于评论分页导航。
  • 参数:可选参数 $label 用于自定义链接文本,默认为空字符串。
  • 实现方式:内部调用 get_previous_comments_link() 函数来获取链接并直接输出。
  • 相关函数:get_previous_comments_link() 用于检索链接而不输出。
  • 版本历史:自 WordPress 2.7.0 版本引入。

📄 原文内容

Displays the link to the previous comments page.

Parameters

$labelstringoptional
Label for comments link text. Default empty.

Source

function previous_comments_link( $label = '' ) {
	echo get_previous_comments_link( $label );
}

Changelog

Version Description
2.7.0 Introduced.