Created
July 22, 2010 10:32
-
-
Save roelven/485822 to your computer and use it in GitHub Desktop.
Remove ugly stuff in Wordpress' wp_head
This file contains hidden or 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 | |
// | |
// Put this in your templates' functions.php for a cleaner header: | |
// | |
function remove_x_pingback($headers) { | |
unset($headers['X-Pingback']); | |
return $headers; | |
} | |
function remove_comments_rss( $for_comments ) { | |
return ''; | |
} | |
// Remove unnecessary bloat in wp header | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'rsd_link'); | |
add_filter('wp_headers', 'remove_x_pingback'); | |
add_filter('post_comments_feed_link_html','remove_comments_rss'); | |
add_filter('post_comments_feed_link','remove_comments_rss'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment