diff --git a/_notes/dwsync.xml b/_notes/dwsync.xml index 8755dba..c4f257f 100644 --- a/_notes/dwsync.xml +++ b/_notes/dwsync.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/inc/_notes/dwsync.xml b/inc/_notes/dwsync.xml index 04941a9..12f9ca3 100644 --- a/inc/_notes/dwsync.xml +++ b/inc/_notes/dwsync.xml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/inc/nav-walker.php b/inc/nav-walker.php index 07f7b42..cdf2485 100644 --- a/inc/nav-walker.php +++ b/inc/nav-walker.php @@ -1,156 +1,363 @@ - - * - * Note on $depth: Counterintuitively, $depth here means the "depth right before we start this menu". - * So basically add one to what you'd expect it to be - */ - function start_lvl(&$output, $depth, $args) - { - if(isset($args->with_search) && $args->with_search == true){ - add_filter('wp_nav_menu_items', 'search_menu_item', 1, 2); - } - - $tabs = str_repeat("\t", $depth); - // If we are about to start the first submenu, we need to give it a dropdown-menu class - if ($depth >= 0) { //really, level-1 or level-2, because $depth is misleading here (see note above) - $output .= "\n{$tabs}