filtrod 4.5.0
pre_handle_404
Opis — z kodu źródłowego
Filters whether to short-circuit default header status handling.
Returning a non-false value from the filter will short-circuit the handling and return early.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$preempt | bool | Whether to short-circuit default header status handling. Default false. |
$wp_query | \WP_Query | WordPress Query object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_handle_404', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_handle_404', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii