filtrod 5.9.0
http_allowed_safe_ports
Opis — z kodu źródłowego
Controls the list of ports considered safe in HTTP API.
Allows to change and allow external requests for the HTTP request.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$allowed_ports | int[] | Array of integers for valid ports. Default allowed ports are 80, 443, and 8080. |
$host | string | Host name of the requested URL. |
$url | string | Requested URL. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'http_allowed_safe_ports', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'http_allowed_safe_ports', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}