Created
January 22, 2013 10:30
-
-
Save leekelleher/4593646 to your computer and use it in GitHub Desktop.
WordPress plugin to remove the auto-generated meta tags.
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: Remove WP Meta | |
Plugin URI: http://leekelleher.com/ | |
Description: This plugin removes the auto-generated WP meta tags from each webpage. | |
Author: Lee Kelleher | |
Version: 0.1.0 | |
Author URI: http://leekelleher.com/ | |
*/ | |
// remove the unwanted <meta> links | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'wp_shortlink_wp_head'); | |
// remove the X-Pingback header | |
function remove_x_pingback($headers) { | |
unset($headers['X-Pingback']); | |
return $headers; | |
} | |
add_filter('wp_headers', 'remove_x_pingback'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!