fetch_feed [ WordPress Function ]
fetch_feed ( $url )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Build SimplePie object based on RSS or Atom feed from URL.
Source
<?php
function fetch_feed($url) {
require_once (ABSPATH . WPINC . '/class-feed.php');
$feed = new SimplePie();
$feed->set_feed_url($url);
$feed->set_cache_class('WP_Feed_Cache');
$feed->set_file_class('WP_SimplePie_File');
$feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200, $url));
do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
$feed->init();
$feed->handle_content_type();
if ( $feed->error() )
return new WP_Error('simplepie-error', $feed->error());
return $feed;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/fetch feed « WordPress Codex
Description. Retrieves an external feed and parses it. Uses the SimplePie and FeedCache functionality for retrieval and parsing and automatic caching.
codex.wordpress.org - WordPress › Support » Tags — fetch_feed
Password (forgot?) Register · WordPress › Support » fetch_feed ...
wordpress.org - How to Import and Display Feeds in WordPress 2.8 and Beyond ...
Nov 23, 2009 ... To do this, WordPress gives us the new fetch_feed() function, which retrieves, parses, and caches any RSS feed, even those generated by your ...
digwp.com - Display RSS Feeds with WordPress Shortcodes using SimplePie ...
Feb 23, 2011 ... The fetch_feed() function provides access to SimplePie in WordPress, but it's not that re-usable. I frequently used this handy function for parsing ...
www.kevinleary.net
Kullanýcý Tartýþmalarý [ wordpress.org ]
- MultiformeIngegno on "Changing cache lifetime for wp_feed_cache"
- MultiformeIngegno on "Changing cache lifetime for wp_feed_cache"
- Daym on "Fetch_feed with todays date?"
- zandfabriek on "fetch_feed for multiple rss feed"
- pjremy on "fetch_feed error"
- SwansonPhotos on "fetch_feed error"
- pjremy on "fetch_feed error"
- gbrown88 on "fetch_feed Function Not Working"
- Ipstenu on "fetch_feed Function Not Working"
- gbrown88 on "fetch_feed Function Not Working"