钩子文档

post_comments_feed_link_html

💡 云策文档标注

概述

post_comments_feed_link_html 是一个 WordPress 过滤器,用于修改文章评论 feed 链接的锚标签 HTML 输出。它允许开发者自定义链接的显示方式。

关键要点

  • 过滤器名称:post_comments_feed_link_html
  • 参数:$link(锚标签字符串)、$post_id(文章 ID)、$feed(feed 类型,如 'rss2'、'atom' 或空字符串)
  • 应用方式:通过 apply_filters 调用,位于 wp-includes/link-template.php 文件中
  • 相关函数:post_comments_feed_link() 用于显示评论 feed 链接
  • 引入版本:WordPress 2.8.0

📄 原文内容

Filters the post comment feed link anchor tag.

Parameters

$linkstring
The complete anchor tag for the comment feed link.
$post_idint
Post ID.
$feedstring
The feed type. Possible values include 'rss2', 'atom', or an empty string for the default feed type.

Source

echo apply_filters( 'post_comments_feed_link_html', $link, $post_id, $feed );

Changelog

Version Description
2.8.0 Introduced.