WordPress.org

Make WordPress Core

Ticket #22140: 22140.1.diff

File 22140.1.diff, 1.2 KB (added by JustinSainton, 2 years ago)
  • wp-includes/feed.php

     
    520520 * 
    521521 * @since 2.8 
    522522 * 
    523  * @param string $url URL to retrieve feed 
     523 * @param string|array $urls URL or URLs to retrieve feed(s) 
    524524 * @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success 
    525525 */ 
    526 function fetch_feed($url) { 
    527         require_once (ABSPATH . WPINC . '/class-feed.php'); 
     526function fetch_feed( $urls ) { 
     527        require_once ( ABSPATH . WPINC . '/class-feed.php' ); 
    528528 
    529529        $feed = new SimplePie(); 
    530530 
     
    536536        $feed->set_cache_class( 'WP_Feed_Cache' ); 
    537537        $feed->set_file_class( 'WP_SimplePie_File' ); 
    538538 
    539         $feed->set_feed_url($url); 
    540         $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) ); 
    541         do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) ); 
     539        $feed->set_feed_url($urls); 
     540        $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $urls ) ); 
     541        do_action_ref_array( 'wp_feed_options', array( &$feed, $urls ) ); 
    542542        $feed->init(); 
    543543        $feed->handle_content_type(); 
    544544