rss_update_period
Filter HookDescription
Filters how often to update the RSS feed.Hook Information
File Location |
wp-includes/feed-rss2.php
View on GitHub
|
Hook Type | Filter |
Line Number | 59 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$duration
|
The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly', 'yearly'. Default 'hourly'. |
Usage Examples
Basic Usage
<?php
// Hook into rss_update_period
add_filter('rss_update_period', 'my_custom_filter', 10, 1);
function my_custom_filter($duration) {
// Your custom filtering logic here
return $duration;
}
Source Code Context
wp-includes/feed-rss2.php:59
- How this hook is used in WordPress core
<?php
54 * @since 2.1.0
55 *
56 * @param string $duration The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly',
57 * 'yearly'. Default 'hourly'.
58 */
59 echo apply_filters( 'rss_update_period', $duration );
60 ?>
61 </sy:updatePeriod>
62 <sy:updateFrequency>
63 <?php
64 $frequency = '1';
PHP Documentation
<?php
/**
* Filters how often to update the RSS feed.
*
* @since 2.1.0
*
* @param string $duration The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly',
* 'yearly'. Default 'hourly'.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/feed-rss2.php
Related Hooks
Related hooks will be displayed here in future updates.