Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress Plugin: Feed Killah (or, How to disable all feeds on your site)
<?php
/*
Plugin Name: Feed Killah!
Plugin URI: http://digitalize.ca
Description: Kills feeds like a mo-fo!
Author: Mohammad Jangda
Version: 0.1
Author URI: http://digitalize.ca
Be nice, and use sort of GPL License, okay?
*/
remove_action('do_feed_rss2', 'do_feed_rss2');
add_action('do_feed_rss2', 'feed_killer');
remove_action('do_feed_rss', 'do_feed_rss');
add_action('do_feed_rss', 'feed_killer');
remove_action('do_feed_atom', 'do_feed_atom');
add_action('do_feed_atom', 'feed_killer');
remove_action('do_feed_rdf', 'do_feed_rdf');
add_action('do_feed_rdf', 'feed_killer');
function feedkillah($comment_feed) { wp_die('I just killed your feeds, fool!'); }
?>
/** Add this to your theme's functions.php file **/
remove_action('do_feed_rss2', 'do_feed_rss2');
add_action('do_feed_rss2', 'feed_killer');
remove_action('do_feed_rss', 'do_feed_rss');
add_action('do_feed_rss', 'feed_killer');
remove_action('do_feed_atom', 'do_feed_atom');
add_action('do_feed_atom', 'feed_killer');
remove_action('do_feed_rdf', 'do_feed_rdf');
add_action('do_feed_rdf', 'feed_killer');
function feedkillah($comment_feed) { wp_die('I just killed your feeds, fool!'); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment