钩子文档

get_comments_pagenum_link

💡 云策文档标注

概述

get_comments_pagenum_link 是一个 WordPress 过滤器钩子,用于过滤当前请求的评论分页链接。它允许开发者修改评论页面链接的生成结果。

关键要点

  • 这是一个过滤器钩子,名称为 get_comments_pagenum_link。
  • 它接收一个参数 $result,表示评论页面链接的字符串。
  • 钩子通过 apply_filters 调用,返回过滤后的链接。
  • 相关函数 get_comments_pagenum_link() 用于检索评论页面链接。
  • 自 WordPress 2.7.0 版本引入。

📄 原文内容

Filters the comments page number link for the current request.

Parameters

$resultstring
The comments page number link.

Source

return apply_filters( 'get_comments_pagenum_link', $result );

Changelog

Version Description
2.7.0 Introduced.