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

git-svn-id: https://develop.svn.wordpress.org/trunk@10671 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2009-02-28 01:50:47 +00:00
parent 1a9d6601e2
commit 148083569f

View File

@@ -534,6 +534,14 @@ function feed_content_type( $type = '' ) {
return apply_filters( 'feed_content_type', $content_type, $type );
}
/**
* Build SimplePie object based on RSS or Atom feed from URL.
*
* @since 2.8
*
* @param string $url URL to retrieve feed
* @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success
*/
function fetch_feed($url) {
require_once (ABSPATH . WPINC . '/class-feed.php');
@@ -545,6 +553,9 @@ function fetch_feed($url) {
$feed->init();
$feed->handle_content_type();
if ( $feed->error() )
return new WP_Error('simplepie-error', $feed->error());
return $feed;
}