Lots of code taken from Andy Skelton’s MRSS and Dinesh Karki’s “Featured Image in RSS Feeds” plugins.