WordPress.org

Make WordPress Core

Changeset 10671


Ignore:
Timestamp:
02/28/2009 01:50:47 AM (12 years ago)
Author:
ryan
Message:

phpdoc for fetch_feed(). Props rmmcue. see #9198

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/feed.php

    r10666 r10671  
    535535}
    536536
     537/**
     538 * Build SimplePie object based on RSS or Atom feed from URL.
     539 *
     540 * @since 2.8
     541 *
     542 * @param string $url URL to retrieve feed
     543 * @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success
     544 */
    537545function fetch_feed($url) {
    538546    require_once (ABSPATH . WPINC . '/class-feed.php');
     
    546554    $feed->handle_content_type();
    547555
     556    if ( $feed->error() )
     557        return new WP_Error('simplepie-error', $feed->error());
     558
    548559    return $feed;
    549560}
Note: See TracChangeset for help on using the changeset viewer.