filtrod 6.3.0
pre_wp_setup_nav_menu_item
Opis — z kodu źródłowego
Filters whether to short-circuit the wp_setup_nav_menu_item() output.
Returning a non-null value from the filter will short-circuit wp_setup_nav_menu_item(), returning that value instead.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$modified_menu_item | object | null | Modified menu item. Default null. |
$menu_item | object | The menu item to modify. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_wp_setup_nav_menu_item', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_wp_setup_nav_menu_item', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii