Created
January 8, 2010 05:21
-
-
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)
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
<?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!'); } | |
?> |
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
/** 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