Code Duplication    Length = 2-11 lines in 2 locations

src/wp-includes/class-wp-http-proxy.php 1 location

@@ 195-196 (lines=2) @@
192
		if ( ! is_null( $result ) )
193
			return $result;
194
195
		if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) )
196
			return false;
197
198
		if ( !defined('WP_PROXY_BYPASS_HOSTS') )
199
			return true;

src/wp-includes/class-http.php 1 location

@@ 835-845 (lines=11) @@
832
		$home = parse_url( get_option('siteurl') );
833
834
		// Don't block requests back to ourselves by default.
835
		if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) ) {
836
			/**
837
			 * Filters whether to block local requests through the proxy.
838
			 *
839
			 * @since 2.8.0
840
			 *
841
			 * @param bool $block Whether to block local requests through proxy.
842
			 *                    Default false.
843
			 */
844
			return apply_filters( 'block_local_requests', false );
845
		}
846
847
		if ( !defined('WP_ACCESSIBLE_HOSTS') )
848
			return true;