[wp-hackers] meta generator in header of themes
Otto
otto at ottodestruct.com
Fri Dec 19 15:07:29 GMT 2008
On Fri, Dec 19, 2008 at 8:17 AM, Stefano Aglietti <steagl4ml at gmail.com> wrote:
> People are asking about why even if they remove the classic
>
> <meta name="generator" content="WordPress <?php bloginfo('version');
> ?>" />
>
> The WP version appears anyway.. i checked the code and i saw it's now
> autogenerated during the wp_head() call.
>
> How to remove it? The function ican be override by a 2 lines plugin?
> And the what are these lines?
To just remove it from the web page:
remove_action('wp_head', 'wp_generator');
To remove it from everything:
add_filter('the_generator', create_function('', 'return "";'));
To remove it from specific places:
add_filter('get_the_generator_TYPE', create_function('', 'return "";'));
Where "TYPE" is one of these: html, xhtml, atom, rss2, rdf, comment, export.
-Otto
More information about the wp-hackers
mailing list