钩子文档

wp_title_rss

💡 云策文档标注

概述

wp_title_rss 是一个 WordPress 过滤器,用于修改博客标题在 RSS 源中的显示。它允许开发者自定义 feed 标题的输出。

关键要点

  • 过滤器名称:wp_title_rss
  • 参数:$wp_title_rss(当前博客标题字符串)、$deprecated(已弃用参数)
  • 相关函数:get_wp_title_rss() 用于获取标题,wp_title_rss() 用于显示标题
  • 版本变更:4.4.0 版本弃用 $sep 参数并重命名为 $deprecated,2.2.0 版本引入

代码示例

echo apply_filters( 'wp_title_rss', get_wp_title_rss(), $deprecated );

注意事项

  • $deprecated 参数已弃用,建议在自定义过滤器时忽略或处理为未使用
  • 此过滤器主要用于 feed.php 文件中的 RSS 标题显示

📄 原文内容

Filters the blog title for display of the feed title.

Description

See also

Parameters

$wp_title_rssstring
The current blog title.
$deprecatedstring
Unused.

Source

echo apply_filters( 'wp_title_rss', get_wp_title_rss(), $deprecated );

Changelog

Version Description
4.4.0 The $sep parameter was deprecated and renamed to $deprecated.
2.2.0 Introduced.