function wp_rss_fetchFeed($url, $timeout = 10, $forceFeed = false) { # SimplePie - extended in admin_init file $feed = new SimplePie_RSSMI(); $feed->set_feed_url($url); $feed->force_feed($forceFeed); $feed->enable_cache(false); $feed->set_timeout($timeout); $feed->init(); $feed->handle_content_type(); return $feed; }
function wp_rss_fetchFeed($url, $timeout = 10, $forceFeed = false, $showVideo = 0) { $feed = new SimplePie_RSSMI(); $feed->set_feed_url($url); $feed->force_feed($forceFeed); $feed->set_autodiscovery_level(SIMPLEPIE_LOCATOR_ALL); if ($showVideo == 1) { $strip_htmltags = $feed->strip_htmltags; array_splice($strip_htmltags, array_search('iframe', $strip_htmltags), 1); $feed->strip_htmltags($strip_htmltags); } $feed->enable_cache(false); $feed->set_timeout($timeout); $feed->init(); $feed->handle_content_type(); return $feed; }