| @@ 831-840 (lines=10) @@ | ||
| 828 | ||
| 829 | static $accessible_hosts = null; |
|
| 830 | static $wildcard_regex = array(); |
|
| 831 | if ( null === $accessible_hosts ) { |
|
| 832 | $accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS); |
|
| 833 | ||
| 834 | if ( false !== strpos(WP_ACCESSIBLE_HOSTS, '*') ) { |
|
| 835 | $wildcard_regex = array(); |
|
| 836 | foreach ( $accessible_hosts as $host ) |
|
| 837 | $wildcard_regex[] = str_replace( '\*', '.+', preg_quote( $host, '/' ) ); |
|
| 838 | $wildcard_regex = '/^(' . implode('|', $wildcard_regex) . ')$/i'; |
|
| 839 | } |
|
| 840 | } |
|
| 841 | ||
| 842 | if ( !empty($wildcard_regex) ) |
|
| 843 | return !preg_match($wildcard_regex, $check['host']); |
|
| @@ 203-212 (lines=10) @@ | ||
| 200 | ||
| 201 | static $bypass_hosts = null; |
|
| 202 | static $wildcard_regex = array(); |
|
| 203 | if ( null === $bypass_hosts ) { |
|
| 204 | $bypass_hosts = preg_split('|,\s*|', WP_PROXY_BYPASS_HOSTS); |
|
| 205 | ||
| 206 | if ( false !== strpos(WP_PROXY_BYPASS_HOSTS, '*') ) { |
|
| 207 | $wildcard_regex = array(); |
|
| 208 | foreach ( $bypass_hosts as $host ) |
|
| 209 | $wildcard_regex[] = str_replace( '\*', '.+', preg_quote( $host, '/' ) ); |
|
| 210 | $wildcard_regex = '/^(' . implode('|', $wildcard_regex) . ')$/i'; |
|
| 211 | } |
|
| 212 | } |
|
| 213 | ||
| 214 | if ( !empty($wildcard_regex) ) |
|
| 215 | return !preg_match($wildcard_regex, $check['host']); |
|