diff --git a/wp-includes/class-wp-feed-cache.php b/wp-includes/class-wp-feed-cache.php
index 2564dffb80..aad0143fb1 100644
a
|
b
|
|
14 | 14 | * |
15 | 15 | * @see SimplePie_Cache |
16 | 16 | */ |
17 | | class WP_Feed_Cache extends SimplePie_Cache { |
| 17 | class WP_Feed_Cache { |
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Creates a new SimplePie_Cache object. |
… |
… |
class WP_Feed_Cache extends SimplePie_Cache { |
26 | 26 | * @param string $extension 'spi' or 'spc'. |
27 | 27 | * @return WP_Feed_Cache_Transient Feed cache handler object that uses transients. |
28 | 28 | */ |
29 | | public function create( $location, $filename, $extension ) { |
| 29 | public static function create( $location, $filename, $extension ) { |
30 | 30 | return new WP_Feed_Cache_Transient( $location, $filename, $extension ); |
31 | 31 | } |
32 | 32 | } |
diff --git a/wp-includes/feed.php b/wp-includes/feed.php
index 0b84cc10a5..555442e08c 100644
a
|
b
|
function fetch_feed( $url ) { |
801 | 801 | // constructor sets it before we have a chance to set the sanitization class. |
802 | 802 | $feed->sanitize = new WP_SimplePie_Sanitize_KSES(); |
803 | 803 | |
| 804 | SimplePie_Cache::register( 'wp_transient', 'WP_Feed_Cache_Transient' ); |
| 805 | $feed->set_cache_location( 'wp_transient://' . $url ); |
804 | 806 | $feed->set_cache_class( 'WP_Feed_Cache' ); |
805 | 807 | $feed->set_file_class( 'WP_SimplePie_File' ); |
806 | 808 | |