rss_update_period
Filters how often to update the RSS feed.
Использование
add_filter( 'rss_update_period', 'wp_kama_rss_update_period_filter' ); /** * Function for `rss_update_period` filter-hook. * * @param string $duration The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly', 'yearly'. * * @return string */ function wp_kama_rss_update_period_filter( $duration ){ // filter... return $duration; }
- $duration(строка)
- The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly', 'yearly'.
По умолчанию: 'hourly'
Список изменений
С версии 2.1.0 | Введена. |
Где вызывается хук
В файле: /wp-includes/feed-rss2.php
wp-includes/feed-rss2.php 59
echo apply_filters( 'rss_update_period', $duration );
wp-includes/feed-rdf.php 40
echo apply_filters( 'rss_update_period', 'hourly' );
wp-includes/feed-rss2-comments.php 56
echo apply_filters( 'rss_update_period', 'hourly' );