Created
August 23, 2013 07:58
-
-
Save ovizii/6316664 to your computer and use it in GitHub Desktop.
Make atom default feed, remove deprecated ones and redirect them
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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