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

git-svn-id: http://svn.automattic.com/wordpress/trunk@10671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-02-28 01:50:47 +00:00
parent 4e787135ea
commit 0a90b7aaf9

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;
}