Ticket #25840: 25840.2.diff
File 25840.2.diff, 1.1 KB (added by , 11 years ago) |
---|
-
wp-includes/class-http.php
519 519 if ( $check['host'] == 'localhost' || $check['host'] == $home['host'] ) 520 520 return apply_filters('block_local_requests', false); 521 521 522 if ( !defined('WP_ACCESSIBLE_HOSTS') )523 return true;524 525 522 static $accessible_hosts; 526 523 static $wildcard_regex = false; 527 524 if ( null == $accessible_hosts ) { 528 $accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS);529 525 526 /** 527 * Filter the list of accessible hosts. 528 * 529 * @since 3.8 530 * 531 * @param array List of accessible hosts 532 */ 533 $accessible_hosts = ! defined( 'WP_ACCESSIBLE_HOSTS' ) ? array() : preg_split( '|,\s*|', WP_ACCESSIBLE_HOSTS ); 534 $accessible_hosts = apply_filters( 'wp_http_accessible_hosts', $accessible_hosts ); 535 536 if ( empty( $acccessible_hosts ) ) 537 return true; 538 530 539 if ( false !== strpos(WP_ACCESSIBLE_HOSTS, '*') ) { 531 540 $wildcard_regex = array(); 532 541 foreach ( $accessible_hosts as $host )