filtrod 3.5.0
exit_on_http_head
Opis — z kodu źródłowego
Filters whether to allow 'HEAD' requests to generate content.
Provides a significant performance bump by exiting before the page content loads for 'HEAD' requests. See #14348.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$exit | bool | Whether to exit without generating any content for 'HEAD' requests. Default true. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'exit_on_http_head', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'exit_on_http_head', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii