From ddea52b0e9806792c960cc79861d1eac64772700 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Sun, 6 Dec 2009 14:28:35 +0000 Subject: [PATCH] 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 --- wp-includes/comment.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 4a3615ef6d..6e7092ca6b 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -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;