From b0356653a8c5714c53af5fd3e7f05fde0423b721 Mon Sep 17 00:00:00 2001 From: westi 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: http://svn.automattic.com/wordpress/trunk@12484 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 ebd392b11..fed45ae0c 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();