我不知道这是否有用,但值得一试。创建Must Use plugin 并删除此行,请参见代码注释:
<?php
/* Plugin Name: Network upgrade exception */
// Run only in the Upgrade screen
add_action( \'load-upgrade.php\', \'add_filter_wpse_115279\' );
function add_filter_wpse_115279()
{
add_filter( \'http_request_args\', \'apply_filter_wpse_115279\', 10, 2 );
}
// http://core.trac.wordpress.org/browser/tags/3.6.1/wp-admin/network/upgrade.php#L68
// wp_remote_get( $upgrade_url, array( \'timeout\' => 120, \'httpversion\' => \'1.1\' ) );
// This function will end up calling WP_Http class, where we can use the filter http_request_args
function apply_filter_wpse_115279( $args, $url )
{
# Adjust var <----------------------------------
$ms_domain_to_check = \'http://example.com/site1/\';
if( FALSE !== strpos( $url, $ms_domain_to_check ) )
{
$args[\'sslverify\'] = false;
}
return $args;
}
/**
* Full list of arguments in
* http://core.trac.wordpress.org/browser/tags/3.6.1/wp-includes/class-http.php#L84
$defaults = array(
\'method\' => \'GET\',
\'timeout\' => apply_filters( \'http_request_timeout\', 5),
\'redirection\' => apply_filters( \'http_request_redirection_count\', 5),
\'httpversion\' => apply_filters( \'http_request_version\', \'1.0\'),
\'user-agent\' => apply_filters( \'http_headers_useragent\', \'WordPress/\' . $wp_version . \'; \' . get_bloginfo( \'url\' ) ),
\'reject_unsafe_urls\' => apply_filters( \'http_request_reject_unsafe_urls\', false ),
\'blocking\' => true,
\'headers\' => array(),
\'cookies\' => array(),
\'body\' => null,
\'compress\' => false,
\'decompress\' => true,
\'sslverify\' => true,
\'stream\' => false,
\'filename\' => null,
\'limit_response_size\' => null,
);
*/