Changeset 10870
- Timestamp:
- 04/04/2009 05:55:48 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/http.php
r10864 r10870 507 507 * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL in your wp-config.php file 508 508 * and this will only allow localhost and your blog to make requests. The constant 509 * WP_ACCESS ABLE_HOSTS will allow additional hosts to go through for requests. The format of the510 * WP_ACCESS ABLE_HOSTS constant is a comma separated list of hostnames to allow.509 * WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the 510 * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow. 511 511 * 512 512 * @since 2.8.0 … … 541 541 return apply_filters('block_local_requests', false); 542 542 543 if ( !defined('WP_ACCESS ABLE_HOSTS') )543 if ( !defined('WP_ACCESSIBLE_HOSTS') ) 544 544 return true; 545 545 546 static $access able_hosts;547 if ( null == $access able_hosts )548 $access able_hosts = preg_split('|,\s*|', WP_ACCESSABLE_HOSTS);549 550 return !in_array( $check['host'], $access able_hosts ); //Inverse logic, If its in the array, then we can't access it.546 static $accessible_hosts; 547 if ( null == $accessible_hosts ) 548 $accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS); 549 550 return !in_array( $check['host'], $accessible_hosts ); //Inverse logic, If its in the array, then we can't access it. 551 551 } 552 552 } … … 1249 1249 } 1250 1250 } 1251 1251 1252 1252 $is_local = isset($args['local']) && $args['local']; 1253 1253 $ssl_verify = isset($args['sslverify']) && $args['sslverify']; … … 1523 1523 if ( !defined('WP_PROXY_BYPASS_HOSTS') ) 1524 1524 return true; 1525 1525 1526 1526 static $bypass_hosts; 1527 1527 if ( null == $bypass_hosts ) 1528 1528 $bypass_hosts = preg_split('|,\s*|', WP_PROXY_BYPASS_HOSTS); 1529 1529 1530 1530 return !in_array( $check['host'], $bypass_hosts ); 1531 1531 }
Note: See TracChangeset
for help on using the changeset viewer.