Alright there! The do_feed_atom
filter should be an action hook where you add the filters:
// add our filters when we're in atom feed context
add_action('do_feed_atom', 'add_decode_feed_entities_filters', 9);
function add_decode_feed_entities_filters() {
add_filter('the_content_feed', 'decode_feed_entities');
add_filter('the_excerpt_rss', 'decode_feed_entities');
}
function decode_feed_entities($content) {
return wp_kses_decode_entities($content);
}
Have a look in wp-includes/default-filters.php
from line 162 (in wp3.4.1) for all the filters you might need to add decoding to.
Alternatively you could have used the is_feed('atom')
conditional:
function decode_feed_entities( $content ) {
if ( is_feed( 'atom' ) )
return wp_kses_decode_entities( $content );
return $content;
}