Correct spelling. Props jbsil. see #4011
git-svn-id: https://develop.svn.wordpress.org/trunk@10870 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9ff40f470b
commit
17bd503fb4
|
@ -506,8 +506,8 @@ class WP_Http {
|
||||||
*
|
*
|
||||||
* You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL in your wp-config.php file
|
* You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL in your wp-config.php file
|
||||||
* and this will only allow localhost and your blog to make requests. The constant
|
* and this will only allow localhost and your blog to make requests. The constant
|
||||||
* WP_ACCESSABLE_HOSTS will allow additional hosts to go through for requests. The format of the
|
* WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
|
||||||
* WP_ACCESSABLE_HOSTS constant is a comma separated list of hostnames to allow.
|
* WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow.
|
||||||
*
|
*
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
* @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
|
* @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
|
||||||
|
@ -540,14 +540,14 @@ class WP_Http {
|
||||||
if ( $check['host'] == 'localhost' || $check['host'] == $home['host'] )
|
if ( $check['host'] == 'localhost' || $check['host'] == $home['host'] )
|
||||||
return apply_filters('block_local_requests', false);
|
return apply_filters('block_local_requests', false);
|
||||||
|
|
||||||
if ( !defined('WP_ACCESSABLE_HOSTS') )
|
if ( !defined('WP_ACCESSIBLE_HOSTS') )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
static $accessable_hosts;
|
static $accessible_hosts;
|
||||||
if ( null == $accessable_hosts )
|
if ( null == $accessible_hosts )
|
||||||
$accessable_hosts = preg_split('|,\s*|', WP_ACCESSABLE_HOSTS);
|
$accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS);
|
||||||
|
|
||||||
return !in_array( $check['host'], $accessable_hosts ); //Inverse logic, If its in the array, then we can't access it.
|
return !in_array( $check['host'], $accessible_hosts ); //Inverse logic, If its in the array, then we can't access it.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue