WP HOOKS
filtrod 3.5.0

pre_http_send_through_proxy

Args 4Plik wp-includes/class-wp-http-proxy.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters whether to preempt sending the request through the proxy.

Returning false will bypass the proxy; returning true will send the request through the proxy. Returning null bypasses the filter.

Parametry

ParametrTypOpis
$overridebool | nullWhether to send the request through the proxy. Default null.
$uristringURL of the request.
$checkarrayAssociative array result of parsing the request URL with <code>parse_url()</code>.
$homearrayAssociative array result of parsing the site URL with <code>parse_url()</code>.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_http_send_through_proxy', 'twoja_funkcja', 10, 4 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
	// Twój kod
}