wphooks.info - pre_http_send_through_proxy

pre_http_send_through_proxy

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/class-wp-http-proxy.php:
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
		 * Returning false will bypass the proxy; returning true will send
		 * the request through the proxy. Returning null bypasses the filter.
		 *
		 * @since 3.5.0
		 *
		 * @param null   $override Whether to override the request result. Default null.
		 * @param string $uri      URL to check.
		 * @param array  $check    Associative array result of parsing the URI.
		 * @param array  $home     Associative array result of parsing the site URL.
		 */
		$result = apply_filters( 'pre_http_send_through_proxy', null, $uri, $check, $home );
		if ( ! is_null( $result ) ) {
			return $result;
		}

		if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) ) {
			return false;
		}

		if ( ! defined( 'WP_PROXY_BYPASS_HOSTS' ) ) {