WordPress filter hook · part of WordPress core
wp_feed_cache_transient_lifetime
A WordPress core filter that 22 plugins also fire themselves, running on 86K+ sites between them.
“This filter is documented in wp-includes/class-wp-feed-cache-transient.php”
How to use wp_feed_cache_transient_lifetime
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'wp_feed_cache_transient_lifetime', function( $value, $url ) {
// Change $value here.
return $value;
}, 10, 2 );Argument names come from Go Fetch Jobs (for WP Job Manager)'s source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
22 plugins that fire wp_feed_cache_transient_lifetime
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
RSS Aggregator by Feedzy40,000+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', $cache_time, $feed_url )includes/abstract/feedzy-rss-feeds-admin-abstract.php:1266 -
PowerPress Podcasting plugin by Blubrry20,000+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $feed_url )powerpressadmin-dashboard.php:34 -
Shapely Companion10,000+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 7200, $this->feeds )inc/epsilon-dashboard/class-epsilon-dashboard.php:112 -
FeedWordPress8,000+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $filename )extend/SimplePie/1.5.3/feedwordpie_cache.class.php:77 -
Illdy Companion6,000+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 7200, $this->feeds )inc/epsilon-dashboard/class-epsilon-dashboard.php:126 -
Friends900+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', HOUR_IN_SECONDS - 600, $url )feed-parsers/class-feed-parser-simplepie.php:291 -
Go Fetch Jobs (for WP Job Manager)600+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url )includes/class-gofetch-importer.php:1719 -
RSS Just Better300+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', $cachefeed, $feed )RSS-just-better.php:932 -
RSS Via Shortcode for Page & Post200+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url )rss-via-shortcode.php:98 -
PressForward100+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url )includes/functions.php:656 -
All-in-one Widget100+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 7200, $feedURL )widgets/widget-rssfeed.php:312 -
RSS Blogroll100+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', $cache_seconds )rss-blogroll.php:176 -
BNS SMF Feeds50+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', $feed_refresh )bns-smf-feeds.php:525 -
Amazon Product Feeder40+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url )amazon-product-feeder.php:158 -
Top Music Charts Widget20+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url )top-music-charts-widget.php:86 -
JS Widgets10+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url )core-adapter-widgets/rss/class.php:228 -
Social Glutton10+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', $time, $url )socialglutton.php:267 -
SuperRSS by Leo Balter10+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', $set_rss_cache_time )superrss.php:340 -
feed-modify-on-your-choice10+ installs
apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url )feedfile/feed.php:540 -
WP JumpFewer than 10 installs
apply_filters( 'wp_feed_cache_transient_lifetime', function( $sec ) { return 7200; } )framework/class-bootstrap.php:24 -
SB Insights RSS Feed PluginFewer than 10 installs
apply_filters( 'wp_feed_cache_transient_lifetime', $instance['feed_cache_input']*HOUR_IN_SECONDS )insights-samsung-feed.widget.php:14 -
ChironFewer than 10 installs
apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url )core/classes/source.class.php:76
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.