filtrod 4.3.0
has_nav_menu
Opis — z kodu źródłowego
Filters whether a nav menu is assigned to the specified location.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$has_nav_menu | bool | Whether there is a menu assigned to a location. |
$location | string | Menu location. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'has_nav_menu', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'has_nav_menu', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii