projects
/
WP-Themes
/
visitbenzie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d483ad0
)
Possible fix for menu walker applying the wrong classes
author
Laury GvR
<laury@gaslightmedia.com>
Tue, 6 Mar 2018 22:07:25 +0000
(17:07 -0500)
committer
Laury GvR
<laury@gaslightmedia.com>
Tue, 6 Mar 2018 22:07:25 +0000
(17:07 -0500)
lib/menu-walker.php
patch
|
blob
|
history
diff --git
a/lib/menu-walker.php
b/lib/menu-walker.php
index
40ee464
..
cfe42e3
100644
(file)
--- a/
lib/menu-walker.php
+++ b/
lib/menu-walker.php
@@
-14,6
+14,7
@@
class Glm_Theme_Top_Bar_Walker extends Walker_Nav_Menu {
$element->classes[] = ( $element->has_children && 1 !== $max_depth ) ? 'has-dropdown' : '';
$element->classes[] = ( $element->post_parent == 0 && $mainLevelCounter < 3 ) ? '' : "drop-left ctr-$mainLevelCounter";
parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
+ $mainLevelCounter = 0;
}
function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {