Skip to content

Instantly share code, notes, and snippets.

@ovizii
Created August 23, 2013 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ovizii/6316664 to your computer and use it in GitHub Desktop.
Save ovizii/6316664 to your computer and use it in GitHub Desktop.
Make atom default feed, remove deprecated ones and redirect them
// set the default feed to atom
add_filter('default_feed','atom_default_feed');
function atom_default_feed() { return 'atom'; }
// remove the rdf and rss 0.92 feeds (nobody ever needs these)
remove_action( 'do_feed_rdf', 'do_feed_rdf', 10, 1 );
remove_action( 'do_feed_rss', 'do_feed_rss', 10, 1 );
// point those feeds at rss 2 (it is backwards compatible with both of them)
add_action( 'do_feed_rdf', 'do_feed_rss2', 10, 1 );
add_action( 'do_feed_rss', 'do_feed_rss2', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment