fetch_feed()
fetch_feed( string|string[] $url )
基于RSS或来自URL的Atom提要构建SimplePie对象。
Build SimplePie object based on RSS or Atom feed from URL.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$url | (string | string[]) | 必需 | 要检索的源的URL。如果是一个url数组,则使用SimplePie的multifeed特性合并提要。另见http://simplepie.org/wiki/faq/typical_multifeed_gotchas网站 |
返回(Return)
(simplepi|WP_Error)成功时为simplepi对象,失败时为WP_Error对象。
源码(Source)
fetch_feed is defined in wp-includes/feed.php.
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.8.0 | wp-includes/feed.php:751 | 5 | 6 |
笔记(Notes)
例子
fetch_feed() 为WP2原创文章,链接:https://www.wp2.cn/functions/fetch_feed/