akcjaod 6.1.0
wp_before_load_template
Opis — z kodu źródłowego
Fires before a template file is loaded.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$_template_file | string | The full path to the template file. |
$load_once | bool | Whether to require_once or require. |
$args | array | Additional arguments passed to the template. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'wp_before_load_template', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'wp_before_load_template', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii