钩子文档

feed_links_extra_show_category_feed

💡 云策文档标注

概述

feed_links_extra_show_category_feed 是一个 WordPress 过滤器,用于控制是否显示分类订阅链接。它允许开发者通过钩子修改默认行为。

关键要点

  • 这是一个过滤器钩子,用于控制分类订阅链接的显示状态。
  • 参数 $show 是一个布尔值,默认为 true,表示显示链接。
  • 在 feed_links_extra() 函数中调用,位于 wp-includes/general-template.php 文件中。
  • 从 WordPress 6.1.0 版本开始引入。

代码示例

$show_category_feed = apply_filters( 'feed_links_extra_show_category_feed', true );

📄 原文内容

Filters whether to display the category feed link.

Parameters

$showbool
Whether to display the category feed link. Default true.

Source

$show_category_feed = apply_filters( 'feed_links_extra_show_category_feed', true );

Changelog

Version Description
6.1.0 Introduced.