函数文档

next_comments_link()

💡 云策文档标注

概述

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

关键要点

  • 函数名称:next_comments_link(),位于 wp-includes/link-template.php 文件中
  • 参数:可选参数 $label(字符串类型,默认空字符串)用于自定义链接文本;可选参数 $max_page(整数类型,默认 0)指定最大页数
  • 功能:直接输出链接,内部调用 get_next_comments_link() 来获取链接
  • 相关函数:get_next_comments_link() 用于检索链接而不直接输出
  • 版本历史:自 WordPress 2.7.0 版本引入

📄 原文内容

Displays the link to the next comments page.

Parameters

$labelstringoptional
Label for link text. Default empty.
$max_pageintoptional
Max page. Default 0.

Source

function next_comments_link( $label = '', $max_page = 0 ) {
	echo get_next_comments_link( $label, $max_page );
}

Changelog

Version Description
2.7.0 Introduced.