钩子文档

rss_update_period

💡 云策文档标注

概述

该文档介绍了 WordPress 中用于过滤 RSS 供程更新周期的 Hook 。它允许开发者通过 apply_filters 函数调整 RSS 供程的更新频率。

关键要点

  • Hook 名称为 'rss_update_period'
  • 参数 $duration 接受字符串值,可选值包括 'hourly' 、'daily' 、'weekly' 、'monthly' 、'yearly'
  • 默认值为 'hourly'
  • 在 WordPress 2.1.0 版本中引入

代码示例

echo apply_filters( 'rss_update_period', $duration );

📄 原文内容

Filters how often to update the RSS feed.

Parameters

$durationstring
The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly', 'yearly'. Default 'hourly'.

Source

echo apply_filters( 'rss_update_period', $duration );

Changelog

Version Description
2.1.0 Introduced.