WordPress.org

Make WordPress Core

Ticket #22140: 22140.3.diff

File 22140.3.diff, 1.3 KB (added by JustinSainton, 13 months ago)
  • wp-includes/feed.php

     
    520520 * 
    521521 * @since 2.8 
    522522 * 
    523  * @param string $url URL to retrieve feed 
     523 * @param mixed $url URL of feed to retrieve. If an array of URLs, the feeds are merged using SimplePie's multifeed feature. See also {@link ​http://simplepie.org/wiki/faq/typical_multifeed_gotchas} 
     524 * 
    524525 * @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success 
    525526 */ 
    526 function fetch_feed($url) { 
    527         require_once (ABSPATH . WPINC . '/class-feed.php'); 
     527function fetch_feed( $url ) { 
     528        require_once ( ABSPATH . WPINC . '/class-feed.php' ); 
    528529 
    529530        $feed = new SimplePie(); 
    530531 
     
    536537        $feed->set_cache_class( 'WP_Feed_Cache' ); 
    537538        $feed->set_file_class( 'WP_SimplePie_File' ); 
    538539 
    539         $feed->set_feed_url($url); 
     540        $feed->set_feed_url( $url ); 
    540541        $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) ); 
    541542        do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) ); 
    542543        $feed->init(); 
    543544        $feed->handle_content_type(); 
    544545 
    545546        if ( $feed->error() ) 
    546                 return new WP_Error('simplepie-error', $feed->error()); 
     547                return new WP_Error( 'simplepie-error', $feed->error() ); 
    547548 
    548549        return $feed; 
    549550}