The installed SimplePie is outdated. I need the current version. The directory and files in WordPress are different, so I don't know if I can just overwrite the files with the current SimplePie.org's version. How can I update SimplePie that WordPress installs? And, keep the updated version if WordPress updates itself?
I'm getting this error on dozens of my sites: PHP Notice: A feed could not be found at http://wordpress.org/plugins/rss/browse/popular/. A feed with an invalid mime type may fall victim to this error, or SimplePie was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed. in path/to/wp-includes/class-simplepie.php on line 1555 I don't know where this is coming from. I have no plugins installed other than my own, so this must be a WordPress core …
Trying to refactor a feed plugin to fallback on cache if source is unavailable (ex: for maintenance). Started using fetch_feed($url); which affords more flexibility in terms of cache. But unsure of how to structure the fallback.
I'm trying to display multiple feeds using the fetch_feed function. Its working well thus far except I can't figure out why the title for each individual rss feed will not show up. Here is my code: <?php // Get RSS Feed(s) include_once(ABSPATH . WPINC . '/feed.php'); $rsslist = array( 'http://www.lt11.com/rss', 'http://feeds.feedburner.com/climbingnarc' ); $rss = fetch_feed($rsslist); if (!is_wp_error( $rss ) ) : $maxitems = $rss->get_item_quantity(25); $rss_items = $rss->get_items(0, $maxitems); endif; ?> <?php if ($maxitems == 0) echo '<li>No items.</li>'; else foreach …
I have this feed from picasa (correct but arbitrary, desired order). The result is messed up Also, with this feed, for example. It's fine in regular, sorted by date feeds, but not these. In the object I get from Simplepie it has a messed up order. I don't do anything fancy just loop over the results and display them in the found order using my commercial gallery plugin. $rss_items = $rss->get_items(0, $rss->get_item_quantity($limit)); I have tried this (hooked into wp_feed_options) but …
I am pulling in posts from separate WP installs on separate URLs. I have everything I want except for the thumbnail. My theme supports thumbnails but when I ask for the thumbnail it is showing me NULL. Anyone know why this may be happening? When I var_dump($item) it shows NULL for my thumbnails. All my posts on that sep. URL do have a featured image. functions.php add_theme_support( 'post-thumbnails' ); The RSS Page <?php include_once(ABSPATH . WPINC . '/feed.php'); $rss = …
I'm trying to improve the localization of the Bones theme. On the admin side it provides an RSS widget which uses the following code: <?php echo $item->get_date('j F Y @ g:i a'); ?> This uses SimplePie, here's the doc for the method. Which would be the best way to make this translatable?
I've got a very basic solution using fetch_feed() and SimplePie to pull in RSS items which is working on my localhost, but for some reason is_wp_error() persists as true on the live server. Is there anyway for me to get specific output about the nature of the error so as to work towards a solution on the live server? <?php include_once(ABSPATH . WPINC . '/feed.php'); $rss = fetch_feed( '[rss feed removed from example]' ); if (!is_wp_error( $rss ) ) : …
I have been using SimplePie to fetch items from a feed and display them on an aside section on my site. I didn't notice before, but this was increasing the load time of the site by over 10 seconds. The reason I believe is that I haven't been using cache, so every time someone entered the site they would access/download the feed all over again. So I set up a cronjob as the documentation told me. Creating update_simplepie_cache.php in public_html. …
I am using the fetch_feed() function provided in WordPress to build a SimplePie feed object. The code from WP is the following: function fetch_feed($url) { require_once (ABSPATH . WPINC . '/class-feed.php'); $feed = new SimplePie(); $feed->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' ); // We must manually overwrite $feed->sanitize because SimplePie's // constructor sets it before we have a chance to set the sanitization class $feed->sanitize = new WP_SimplePie_Sanitize_KSES(); $feed->set_cache_class( 'WP_Feed_Cache' ); $feed->set_file_class( 'WP_SimplePie_File' ); $feed->set_feed_url($url); $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) ); …
I'm using RSS.php to parse RSS feeds on my site because I haven't got my head around SimplePie yet. Functionally, it works exactly as I want it to, but with error reporting on, I of course get the "RSS.php has been deprecated" error message. My question is, is there any harm in using RSS.php? I can't find any information on why it was deprecated, and as SimplePie has ceased development, I don't see any pressing need to switch to it.
using the next wordpress version: 4.2.2 plugins on my site: Complementos instalados: LayerSlider WP por Kreatura Media versión 5.2.0 CodeStyling Localization por Heiko Rabe versión 1.99.30 Desactivar Comentarios por Samir Shah versión 1.3.1 Google Analytics por Yoast por Equipo Yoast versión 5.4.2 Anti-Malware and Brute-Force Security by ELI por Eli Scheetz versión 4.15.20 KIA Subtitle por Kathy Darling versión 1.6.3 Plugins Language Switcher por Vladimir Garagulya versión 1.4.4 Sucuri Security - Auditing Malware Scanner and Hardening por Sucuri INC versión …
I have a feed with 50 items but seemingly no matter what I do, it always returns just 25. $feed->set_item_limit(50); or $rss_items = $rss->get_items(0,50); none of these have any effect nor do I see any reference to the number 25 in the class source, I don't get it. The feed is http://gdata.youtube.com/feeds/base/users/silviavaldemoros/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile&max-results=50
I am trying to pull the post thumbnail from an RSS feed to output on an external site. I am using the following function to add the post thumbnail to the site: function rss_post_thumbnail($content) { global $post; if(has_post_thumbnail($post->ID)) { $content = '<p>' . get_the_post_thumbnail($post->ID, 'be_home') . '</p>' . get_the_content(); } return $content; } add_filter('the_excerpt_rss', 'rss_post_thumbnail'); add_filter('the_content_feed', 'rss_post_thumbnail'); I am then using the fetch_feed function in WordPress (with this shortcode: http://www.kevinleary.net/display-rss-feeds-wordpress-shortcodes/) to generate the RSS feed. Whenever I try to get …
I'm trying to do a custom query after an rss fetch_feed but for some reason nothing shows up. The code I'm using to fetch the feed is: <?php // Get RSS Feed(s) include_once( ABSPATH . WPINC . '/feed.php' ); // Get a SimplePie feed object from the specified feed source. $rss = fetch_feed( 'http://seko.se/feed.rss?rssId=97' ); if ( ! is_wp_error( $rss ) ) : // Checks that the object is created correctly // Figure out how many total items there are, …
I'm using WP function fetch_feed to retrieve a feed and display its items. <?php /* include the required file */ include_once(ABSPATH . WPINC . '/feed.php'); /* specify the source feed */ $rss = fetch_feed('FEED_URL'); /* checks obj. is created */ if (!is_wp_error( $rss ) ) : /* specify number of items */ $maxitems = $rss->get_item_quantity(4); /* create an array of items */ $rss_items = $rss->get_items(0, $maxitems); endif; ?> <ul> <?php if ($maxitems == 0) echo '<li>Content not available.</li>'; else // …
According to the docs, if you want to cache results for a fetch of RSS feeds with simplepie, you do this: add_filter( 'wp_feed_cache_transient_lifetime' , 'return_7200' ); $feed = fetch_feed( $feed_url ); remove_filter( 'wp_feed_cache_transient_lifetime' , 'return_7200' ); My question is if I want to cache the results for several feed urls (by looping through an array), would I really want to add and remove the filter for each pass of the loop (wouldn't that cause separate entries in the cache for …
I'm having trouble reading RSS feeds created by WP3 on the same domain. When I do a print_r($rss); at the part of my plugin where it does the RSS parsing, I get the following output: WP_Error Object ( [errors] => Array ( [simplepie-error] => Array ( [0] => WP HTTP Error: couldn't connect to host ) ) [error_data] => Array ( ) ) The RSS feed address being supplied validates and everything, btw. It seems to me the issue has …
I have a feed from an events calendar that once put in the WordPress RSS widget displays the feed items in reverse chronological order. So the events that are farthest in the future display first, and the events that are coming up soon are displaying last. We are only displaying the title from the feed (the event name) and the pubdate from the feed (which is the date of the event). Does anyone know of a way using SimplePie, a …
Where does WordPress default SimplePie save cache data? I could only find relevant info about cache durations but not the location. SimplePie has a method called set_cache_location() but I cannot find it being used in WordPress. I'm writing a plugin and if a cache folder is available already by default, I'd like to use it rather than creating for my plugin. Does anybody know it?