From 179cfd2e984ecece80b24ceac370a07dac3d45a8 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 24 Sep 2025 16:25:41 +0200 Subject: [PATCH] FEEDBACK Make page-icon clickable by moving it inside list-item link --- includes/nawalker_fction.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/nawalker_fction.php b/includes/nawalker_fction.php index 3e152d9..1882ea1 100644 --- a/includes/nawalker_fction.php +++ b/includes/nawalker_fction.php @@ -9,12 +9,10 @@ function carhop_wrap_parent_menu_item_buttons($output, $item, $depth, $args) if ($args->theme_location === "primary") { $page_icon = get_field('page_icon', $item->object_id); - - if (isset($page_icon)) { $icon = ''; - $link = $output; - $output = $icon . $link; + // Insérer l'icône à l'intérieur du lien (seulement la première occurrence) + $output = preg_replace('/>/', '>' . $icon, $output, 1); } }