Created
April 19, 2016 07:42
-
-
Save polevaultweb/563fe6abdfd88c20e80c1050021b5552 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: DBI Connection Fix | |
Author: Delicious Brains | |
Author URI: http://deliciousbrains.com | |
*/ | |
function dbi_connection( $transports, $args, $url ) { | |
if ( false !== strpos( $url, 'deliciousbrains.com' ) ) { | |
// Use streams as cURL results in connection refused | |
return array( 'streams', 'curl' ); | |
} | |
return $transports; | |
} | |
add_filter( 'http_api_transports', 'dbi_connection', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment