filtrod 2.7.0
http_headers_useragent
Opis — z kodu źródłowego
Filters the user agent value sent with an HTTP request.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$user_agent | string | WordPress user agent string. |
$url | string | The request URL. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'http_headers_useragent', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'http_headers_useragent', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii