Skip to content

Instantly share code, notes, and snippets.

@mjangda
Created January 8, 2010 05:21
Show Gist options
  • Save mjangda/271871 to your computer and use it in GitHub Desktop.
Save mjangda/271871 to your computer and use it in GitHub Desktop.
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