[wp-trac] [WordPress Trac] #5065: Unify User-Agent strings

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 24 05:22:17 GMT 2007


#5065: Unify User-Agent strings
-------------------------+--------------------------------------------------
 Reporter:  docwhat      |       Owner:  anonymous         
     Type:  enhancement  |      Status:  new               
 Priority:  normal       |   Milestone:  2.5               
Component:  General      |     Version:                    
 Severity:  normal       |    Keywords:  privacy user-agent
-------------------------+--------------------------------------------------
 In WordPress 2.3, there are either 10 or 11 places where User-Agent
 strings are created.

 I would like to suggest adding a function, wp_user_agent() which would
 generate the base User-Agent including things like PHP version and
 bloginfo('url').  It could optionally take an array (in hash form) to
 append extra values, like Akismet version, etc.

 Example Usage:
 {{{
 #!php
 $http_response .= "User-Agent: ".wp_user_agent(Array('Akismet' => '2.0'));
 }}}

 This would prevent repetition of code and allow for admins or plugin
 developers to add or remove information they are not comfortable sending
 out.

 Ciao!

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


More information about the wp-trac mailing list