Contents
[ hide ]
Popular Add-Ons
Many add-ons and filters have been developed for or by the FeedWordPress community. Here are some of the most commonly used.
- Add Attribution for FeedWordPress provides a convenient interface for adding attribution or other boilerplate text to syndicated posts without having to edit your WordPress theme.
- Add-on: Limit Posts By Date allows you to filter out syndicated posts by their date, age, or the number of incoming posts.
- Add-on: Limit Size of Posts allows you to set upper limits on the length of posts, making FeedWordPress display a shortened excerpt when a syndicated post exceeds a given number of characters, words or sentences.
- Strip HTML for FeedWordPress is an add-on module which allows you to automatically strip out HTML tags from the body of posts that FeedWordPress has syndicated.
- Add-on: Open links in new windows is an add-on module which automatically rewrites links within the content of syndicated posts, so that the links within the body of the post will open in a new browser window.
Developing Add-Ons and Filters
FeedWordPress creates hooks using the WordPress plugin architecture. You can exploit these to write PHP plugins that alter FeedWordPress’s behavior or filter incoming posts. See How do I write add-ons for FeedWordPress? for a quick-start guide on how to prepare the modules.
API
- class SyndicatedPost
- class SyndicatedLink
- class FeedTime
Filters
syndicated_item— applied to each item coming off the Atom/RSS newsfeed; allows you to alter any XML field or to filter out this item and skip ahead to the next postsyndicated_post— applied to each potential post for the WordPress database; allows you to alter any database field or to filter out this item and skip ahead to the next post
Post Content and Data
-
syndicated_item_title— filter, alter or act on the post title for each incoming post being considered for syndication -
syndicated_item_author— filter, alter or act on the author name and author meta-data for each incoming post being considered for syndication -
syndicated_item_content— filter, alter or act on the HTML content for each incoming post being considered for syndication -
syndicated_item_excerpt— filter, alter or act on the text excerpt for each incoming post being considered for syndication -
syndicated_item_categories— applied to an array of category names representing the categories provided for that individual post by the source feed -
syndicated_item_tags— applied to an array of category names representing the inline tags provided for that individual post by the source feed -
syndicated_item_published— filter, alter or act on the Unix-epoch timestamp for the first publication of a syndicated post -
syndicated_item_created— filter, alter or act on the Unix-epoch timestamp for the creation of a syndicated post -
syndicated_item_updated— filter, alter or act on the Unix-epoch timestamp for the most recent update to a syndicated post -
syndicated_item_guid— filter, alter or act on the guid (globally unique identifier) that identifies a particular syndicated post
Post Meta-Data
syndicated_item_enclosure_url— filter, alter or act on the URL(s) of media enclosures attached to the file by an RSS or Atom enclosure element, or by a MediaRSS attachment.syndicated_item_enclosure_length— filter, alter or act on the length in bytes reported for media enclosures attached to the file by an RSS or Atom enclosure element, or by a MediaRSS attachment.syndicated_item_enclosure_type— filter, alter or act on the MIME type for media enclosures attached to the file by an RSS or Atom enclosure element, or by a MediaRSS attachment.syndicated_item_source_titlesyndicated_item_source_linksyndicated_item_commentssyndicated_item_commentrsssyndicated_item_link
Post Processing
Post Display
Feed Data
Actions
feedwordpress_update— invoked just before FeedWordPress begins to check one or more newsfeeds for updates. Hooked in functions receive as an argument the URI of the blog or newsfeed that FeedWordPress is updating.feedwordpress_check_feed— invoked just before FeedWordPress checks an individual newsfeed for updates. Hooked in functions receive as an argument an associative array of data about the feed.$feed[1]contains the (human-readable) name of the newsfeed;$feed[2]contains the URI about to be checked; etc.feedwordpress_check_feed_completefeedwordpress_update_complete— invoked when finished checking all of the feeds to be checked in the most recent update round. Hooked in functions receive as an argument an array containing the number of new posts added and the number of posts updated.post_syndicated_item— invoked whenever FeedWordPress has completed inserting a new post into the WordPress database. Receives the numerical ID of the new post as an argument.update_syndicated_item— invoked whenever FeedWordPress has completed updating a previously existing post in the WordPress database. Receives the numerical ID of the updated post as an argument.feedwordpress_admin_page_authors_meta_boxesfeedwordpress_admin_page_authors_savefeedwordpress_admin_page_backend_meta_boxesfeedwordpress_admin_page_backend_savefeedwordpress_admin_page_categories_meta_boxesfeedwordpress_admin_page_categories_savefeedwordpress_admin_page_feeds_meta_boxesfeedwordpress_admin_page_feeds_savefeedwordpress_admin_page_posts_meta_boxesfeedwordpress_admin_page_posts_savefeedwordpress_admin_page_syndication_meta_boxes
Add-Ons Awaiting Development
These add-ons represent add-on features that have been commonly requested, but which are better provided through an add-on than through additions to the FeedWordPress core code. If you would like to support the development of any of these features, you can do so with a small donation to help cover the costs of the time for development and testing. If you need an add-on or filter to implement a feature that isn’t listed here, you may be
interested in the custom development services available to FeedWordPress users.
-
Alternative Caching Options — an add-on module to allow you to store SimplePie feed cache data in locations other than the WordPress options database table — in a separate table, in another database, or in flat files in the filesystem.
I’m using FeedWordPress to aggregate, and it’s terrific. The particular tweak I need to make is that I want to show only an excerpt of each aggregated post, with links back to the original.
Specifically, I’d like to include just about 250 characters from each content item that’s aggregated. My goal is to encourage readers to visit the original post. I can’t do this just with formatting, because I want it to apply to the blog’s RSS feed as well.
I’m using the Add Attribution add-on to pre-pend and post-pend information and links, but for the content itself it seems I need a filter. I’m new to filters and actions. Here’s what I’ve come up with (borrowing a truncation function I located and attributed):
This doesn’t have any effect, so I’m doing something wrong. Can anyone point me in a good direction?
Thanks very much for your help.