07 Nov 2007

Remove WordPress rsd_link(), wlwmanifest_link(), wp_generator()

rsd_link(), wlwmanifest_link(), wp_generator() are bunch of WordPress default filters that clutter the <head></head> section of your Theme’s template header.php file:

<head>
...
<link rel="EditURI" type="application/rsd xml" title="RSD" 
href="http://.../xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest xml" 
href="http://.../wp-includes/wlwmanifest.xml" /> 
<meta name="generator" content="WordPress/..." />
...
</head>

Remove rsd_link() and / or wlwmanifest_link()

You can remove clutter of unused rsd_link() (Really Simple Discovery) or wlwmanifest_link() (Windows Live Writer) by adding the following to your Theme’s template functions.php file:

remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');

wp_generator()

wp_generator() filter hooks the generator META tag to wp_head() which outputs:

<meta name="generator" content="WordPress/..." />

Besides the <head></head> section of your theme template file, it also adds in RSS, ATOM and etc.

To remove it, just add the following to your Theme’s template functions.php file:

add_filter('the_generator', create_function('', 'return "";'));

Now, that really clears my HEAD.