akcjaod 5.4.0
wp_nav_menu_item_custom_fields
Opis — z kodu źródłowego
Fires just before the move buttons of a nav menu item in the menu editor.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$item_id | string | Menu item ID as a numeric string. |
$menu_item | \WP_Post | Menu item data object. |
$depth | int | Depth of menu item. Used for padding. |
$args | \stdClass | null | An object of menu item arguments. |
$current_object_id | int | Nav menu ID. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'wp_nav_menu_item_custom_fields', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'wp_nav_menu_item_custom_fields', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}Popularne w tej kategorii