From 6979dbdc02ca58be184700d8f37c90ccb5027b05 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Tue, 22 Dec 2009 12:48:40 +0000 Subject: [PATCH] Pass the url to the 'wp_feed_cache_transient_lifetime' filter to give more context. Allow plugins to set extra options on SimplePie using the new 'wp_feed_options' action. Fixes #11117 props nacin. git-svn-id: https://develop.svn.wordpress.org/trunk@12484 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/feed.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/feed.php b/wp-includes/feed.php index ebd392b116..fed45ae0c1 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -524,7 +524,8 @@ function fetch_feed($url) { $feed->set_feed_url($url); $feed->set_cache_class('WP_Feed_Cache'); $feed->set_file_class('WP_SimplePie_File'); - $feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200)); + $feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200, $url)); + do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) ); $feed->init(); $feed->handle_content_type();