Unify User-Agent strings
|Reported by:||docwhat||Owned by:||jacobsantos|
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.
$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.
Change History (22)
comment:18 santosj — 6 years ago
- Milestone 2.9 deleted
- Resolution set to duplicate
- Status changed from assigned to closed