On Patching WordPress with Atom 1.0

Niklas Lindblad, in the comments to the post on hAtom, wrote to remind me that James Snell has a drop-in replacement for wp-atom.php that will upgrade your WordPress blog’s Atom feed to 1.0.

In order to use that with PHP 4, apply Niklas’ patch.

Finally, if you don’t want to syndicate your feed’s content as escaped HTML, apply my patch that combines my changes and Niklas’ to James’ code. However, you’re now responsible for making sure your entries are valid XHTML.

Note: after applying the patch, you’ll need to modify the format string passed to the_time to account for your offset from GMT. There’s probably another way to do this.

  • http://www.snellspace.com James Snell

    Minor correction: it’s James, not Jason :-)

  • http://www.whump.com/ Bill Humphries

    @ James: Sorry about that. Fixed.

  • http://CKon.wordpress.com _ck_

    Also note you can now do Atom 1.0 comments automagically along with WP internal rewrites if you do my little change to functions.php. I posted about it over here:

    http://ckon.wordpress.com/2006/08/10/wordpress-20-21a-is-still-using-atom-03/#more-13

    that way /comments/feed/atom/ will work :)