[wp-trac] [WordPress Trac] #4803: WordPress should be inserting its generator tag via the wp_head hook

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 23 04:13:12 GMT 2007


#4803: WordPress should be inserting its generator tag via the wp_head hook
--------------------------+-------------------------------------------------
 Reporter:  JeremyVisser  |       Owner:  anonymous   
     Type:  enhancement   |      Status:  new         
 Priority:  low           |   Milestone:  2.4 (future)
Component:  Template      |     Version:  2.3         
 Severity:  trivial       |    Keywords:              
--------------------------+-------------------------------------------------
 This is a legacy behaviour carried on from the dark ages of WordPress:

 {{{
 <meta name="generator" content="WordPress <?php bloginfo('version'); ?>"
 /> <!-- leave this for stats -->
 }}}

 ...which is included in every {{{header.php}}} of every WordPress theme in
 every WordPress blog.

 Don't you think a hook could be used instead?

 {{{
 function wp_vanity() {
     ?><meta name="generator" content="WordPress <?php bloginfo('version');
 ?>" /> <!-- leave this for stats --><?php
 }

 add_action('wp_head', 'wp_vanity');
 add_action('admin_head', 'wp_vanity');
 }}}

 I realise it might be a bit impractical, seeing as though doing it, and
 loading up an old theme would result in duplicate tags, but does everyone
 agree it's more 'elegant'?

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4803>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list