WordPress.org

Make WordPress Core

Ticket #22140: fetch_feed_mixed_params.diff

File fetch_feed_mixed_params.diff, 1.1 KB (added by tlovett1, 3 years ago)

A patch that updates the documentation for the fetch_feed method as well as renames the parameter.

  • 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 URL's 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) { 
     526function fetch_feed($urls) { 
    527527        require_once (ABSPATH . WPINC . '/class-feed.php'); 
    528528 
    529529        $feed = new SimplePie(); 
     
    537537                $feed->set_file_class( 'WP_SimplePie_File' ); 
    538538        } 
    539539 
    540         $feed->set_feed_url($url); 
    541         $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) ); 
    542         do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) ); 
     540        $feed->set_feed_url($urls); 
     541        $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $urls ) ); 
     542        do_action_ref_array( 'wp_feed_options', array( &$feed, $urls ) ); 
    543543        $feed->init(); 
    544544        $feed->handle_content_type(); 
    545545