钩子文档

feed_link

💡 云策文档标注

概述

feed_link 是一个 WordPress 过滤器钩子,用于修改或过滤特定类型 feed 的永久链接。它允许开发者自定义 RSS2、Atom 或默认 feed 的链接输出。

关键要点

  • feed_link 是一个过滤器钩子,用于过滤 feed 类型的永久链接。
  • 参数包括 $output(feed 永久链接字符串)和 $feed(feed 类型,如 'rss2'、'atom' 或空字符串表示默认类型)。
  • 在 WordPress 1.5.0 版本中引入,相关函数包括 get_feed_link()。

📄 原文内容

Filters the feed type permalink.

Parameters

$outputstring
The feed permalink.
$feedstring
The feed type. Possible values include 'rss2', 'atom', or an empty string for the default feed type.

Source

return apply_filters( 'feed_link', $output, $feed );

Changelog

Version Description
1.5.0 Introduced.