From 5c1d7a60760c3f07a8b7673bc37340b3c375b825 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 12 Dec 2023 11:58:50 +0100 Subject: [PATCH] commenting unecessary renovateur walker --- includes/navwalker.php | 50 ++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/includes/navwalker.php b/includes/navwalker.php index 718c7ed..0354a06 100644 --- a/includes/navwalker.php +++ b/includes/navwalker.php @@ -17,39 +17,37 @@ function wrap_parent_menu_item_buttons($output, $item, $depth, $args) } - // #### MENU RENOVATEUR — FOOTER — N'est pas utilisé pour le menu principal - if ($args->theme_location === "renovateur") { - $page_icon = get_field('page_icon', $item->object_id); + // #### MENU RENOVATEUR + // if ($args->theme_location === "renovateur") { + // $page_icon = get_field('page_icon', $item->object_id); - if (in_array('menu-item-has-children', $item->classes, true)) { - $output = ''; - } + // if (in_array('menu-item-has-children', $item->classes, true)) { + // $output = ''; + // } - // #### ICONE DE PAGE FOR TOP LEVEL MENU ITEMS - if (isset($page_icon['url'])) { - $icon = ''; - $link = $output; - $output = $icon . $link; - } + // // #### ICONE DE PAGE FOR TOP LEVEL MENU ITEMS + // if (isset($page_icon['url'])) { + // $icon = ''; + // $link = $output; + // $output = $icon . $link; + // } - // #### TAXONOMY : GET ICON & INFOS ABOUT TAX + // // #### TAXONOMY : GET ICON & INFOS ABOUT TAX - if ($item->type === "taxonomy") { - $term = get_term_by('id', $item->object_id, 'thematiques'); - $cover = get_field('taxonomy_pictures', "thematiques_" . $item->object_id); + // if ($item->type === "taxonomy") { + // $term = get_term_by('id', $item->object_id, 'thematiques'); + // $cover = get_field('taxonomy_pictures', "thematiques_" . $item->object_id); - $output = ''; - $output .= ''; - $output .= '
' . $item->title . "
"; - $output .= '

' . $term->description . "

"; - $output .= "
"; - } - } - - // if ($args->theme_location === "footer" && in_array('menu-item-has-children', $item->classes, true)) { - // $output = $item->title; + // $output = ''; + // $output .= ''; + // $output .= '
' . $item->title . "
"; + // $output .= '

' . $term->description . "

"; + // $output .= "
"; + // } // } + + return $output; } add_filter('walker_nav_menu_start_el', 'wrap_parent_menu_item_buttons', 10, 4);