Atom 1.0 Feeds in WordPress
After a small amount of hacking, I now have fully-valid Atom 1.1 feeds for entries (thanks to comatoast’s patch, although I patched it further because the <id>s were silly) and comments (thanks to this Atom 0.3 comments feed thing). They’re both valid: entries, comments.
Here are the relevant files I now have in my 1.5.2 installation:
There is also an RSS entries feed for legacy software.
Tip for those using the Universal Feed Parser: there’s a patch for Atom 1.0 support (that’s how I got Straw to be happy).
Heh heh heh. Atom 1.1 exists only in my imagination. Did I mention I implemented the <unicorn> element in my feed?
October 11th, 2005 at 21:35 EDT
There is no Atom 1.1. The IETF draft defines Atom 1.0
October 12th, 2005 at 00:05 EDT
Heh heh, silly me.
Thank you. I would have gone on confused for ages if you hadn’t pointed it out and prompted me to check the document.
October 13th, 2005 at 09:25 EDT
Were there any big changes to bring the comments feed in line with the Atom 1.0 spec? Also, is there anything you would recommend adding or changing? Thanks for linking me!
October 14th, 2005 at 23:21 EDT
No big changes. It was mostly some name changes like modified/updated, and adding an id for the feed. I chose /comments/ as the feed id even though it doesn’t exist by default because I couldn’t bring myself to call it /comments/feed/ and it couldn’t have been / since the entries feed would have that as its id.
That’s about it.
By the way, thank you for providing the Atom 0.3 comments feed source, I didn’t relish the thought of writing it from scratch (not least because I’m not famaliar with WordPress and its functions).
October 24th, 2005 at 02:07 EDT
I’ve submitted the script to the Wordpress bug tracker. The only change I made to the script was to add a check to ensure the IS a subtitle before outputting the tags (otherwise it won’t validate against feedvalidator.org’s validator if there is no subtitle). Other than that I left the script intact because (a) it validates, and (b) the subject lines are consistent with those in the RSS feed generator.
http://trac.wordpress.org/ticket/1785
October 26th, 2005 at 15:46 EDT
That’s a good idea. I never thought of contributing my code back to WordPress. Thanks for taking the time to do so.