钩子文档

feed_links_extra_show_post_type_archive_feed

💡 云策文档标注

概述

feed_links_extra_show_post_type_archive_feed 是一个 WordPress 过滤器,用于控制是否显示文章类型归档的 feed 链接。它允许开发者根据条件动态调整 feed 链接的显示。

关键要点

  • 这是一个过滤器 Hook,用于修改文章类型归档 feed 链接的显示状态。
  • 参数 $show 是一个布尔值,默认为 true,表示显示链接;可设置为 false 来隐藏链接。
  • 在 WordPress 6.1.0 版本中引入,与 feed_links_extra() 函数相关。

代码示例

$show_post_type_archive_feed = apply_filters( 'feed_links_extra_show_post_type_archive_feed', true );

📄 原文内容

Filters whether to display the post type archive feed link.

Parameters

$showbool
Whether to display the post type archive feed link. Default true.

Source

$show_post_type_archive_feed = apply_filters( 'feed_links_extra_show_post_type_archive_feed', true );

Changelog

Version Description
6.1.0 Introduced.