获得feed订阅内容
描述
检索外部源并对其进行分析。使用 SimplePie 和 FeedCache 功能进行检索、解析和自动缓存。
用法
<?php $feed = fetch_feed( $uri ); ?>
参数
$uri
(mixed) (必填) The URI of the RSS feed you want to retrieve. If an array of URIs, the feeds are merged using SimplePie’s multifeed feature. The resulting feed is returned as a standard SimplePie object.
默认值: None
注意
fetch_feed
caches results for 12 hours by default. You can modify this by modifying the time interval via the 过滤器 wp_feed_cache_transient_lifetime.
历史
添加于 版本 Version 2.8
源文件
fetch_feed
is defined in wp-includes/feed.php
.
相关
SimplePie Documentation
原文:http://codex.wordpress.org/Function_Reference/fetch_feed