@@ 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']); |
@@ 852-861 (lines=10) @@ | ||
849 | ||
850 | static $accessible_hosts = null; |
|
851 | static $wildcard_regex = array(); |
|
852 | if ( null === $accessible_hosts ) { |
|
853 | $accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS); |
|
854 | ||
855 | if ( false !== strpos(WP_ACCESSIBLE_HOSTS, '*') ) { |
|
856 | $wildcard_regex = array(); |
|
857 | foreach ( $accessible_hosts as $host ) |
|
858 | $wildcard_regex[] = str_replace( '\*', '.+', preg_quote( $host, '/' ) ); |
|
859 | $wildcard_regex = '/^(' . implode('|', $wildcard_regex) . ')$/i'; |
|
860 | } |
|
861 | } |
|
862 | ||
863 | if ( !empty($wildcard_regex) ) |
|
864 | return !preg_match($wildcard_regex, $check['host']); |