// Block all feed requests function disable_all_wordpress_feeds(){status_header(410);nocache_headers();wp_die('Feed is disabled.','Feed Disabled',array('response'=>410,'back_link'=>false,))}add_action('do_feed','disable_all_wordpress_feeds',1);add_action('do_feed_rdf','disable_all_wordpress_feeds',1);add_action('do_feed_rss','disable_all_wordpress_feeds',1);add_action('do_feed_rss2','disable_all_wordpress_feeds',1);add_action('do_feed_atom','disable_all_wordpress_feeds',1);add_action('do_feed_rss2_comments','disable_all_wordpress_feeds',1);add_action('do_feed_atom_comments','disable_all_wordpress_feeds',1);// Block feed requests detected by WordPress add_action('template_redirect',function (){if (is_feed()){disable_all_wordpress_feeds()}},1);// Block ?feed=... add_action('template_redirect',function (){if (isset($_GET['feed'])){disable_all_wordpress_feeds()}},1);// Remove feed links from <head>remove_action('wp_head','feed_links',2);remove_action('wp_head','feed_links_extra',3);// Remove RSS feed widget add_filter('widget_display_callback',function ($instance,$widget){if ($widget->id_base==='rss'){return false}return $instance},10,2);