Allow a plugin to change the filter the magpie user agent string. Fixes #7085 props JohnLamansky.
git-svn-id: http://svn.automattic.com/wordpress/trunk@8503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e612643a06
commit
f08ff1124c
|
@ -518,7 +518,7 @@ endif;
|
||||||
function _fetch_remote_file ($url, $headers = "" ) {
|
function _fetch_remote_file ($url, $headers = "" ) {
|
||||||
// Snoopy is an HTTP client in PHP
|
// Snoopy is an HTTP client in PHP
|
||||||
$client = new Snoopy();
|
$client = new Snoopy();
|
||||||
$client->agent = MAGPIE_USER_AGENT;
|
$client->agent = apply_filters( 'magpie_user_agent', MAGPIE_USER_AGENT );
|
||||||
$client->read_timeout = MAGPIE_FETCH_TIME_OUT;
|
$client->read_timeout = MAGPIE_FETCH_TIME_OUT;
|
||||||
$client->use_gzip = MAGPIE_USE_GZIP;
|
$client->use_gzip = MAGPIE_USE_GZIP;
|
||||||
if (is_array($headers) ) {
|
if (is_array($headers) ) {
|
||||||
|
|
Loading…
Reference in New Issue