Allow plugins to filter the UserAgent used for PingBack requests. Fixes #11317 props mtdewvirus.

git-svn-id: https://develop.svn.wordpress.org/trunk@12321 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-12-06 14:28:35 +00:00
parent 5f78d6f2a8
commit ddea52b0e9
1 changed files with 1 additions and 2 deletions

View File

@ -1674,8 +1674,7 @@ function pingback($content, $post_ID) {
// using a timeout of 3 seconds should be enough to cover slow servers
$client = new IXR_Client($pingback_server_url);
$client->timeout = 3;
$client->useragent .= ' -- WordPress/' . $wp_version;
$client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . $wp_version, $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom);
// when set to true, this outputs debug messages by itself
$client->debug = false;