WordPress.org

Make WordPress Core

Ticket #9926: 9926.diff

File 9926.diff, 710 bytes (added by neoxx, 9 years ago)

fix for feed.php

  • feed.php

     
    543543 * @param string $url URL to retrieve feed
    544544 * @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success
    545545 */
    546 function fetch_feed($url) {
     546function fetch_feed($url, $lifetime=43200) {
    547547        require_once (ABSPATH . WPINC . '/class-feed.php');
    548548
    549549        $feed = new SimplePie();
    550550        $feed->set_feed_url($url);
    551551        $feed->set_cache_class('WP_Feed_Cache');
    552552        $feed->set_file_class('WP_SimplePie_File');
    553         $feed->set_cache_duration(43200);
     553        $feed->set_cache_duration($lifetime);
    554554        $feed->init();
    555555        $feed->handle_content_type();
    556556