Skip to content

Commit

Permalink
Merge pull request understrap#859 from stevygee/master
Browse files Browse the repository at this point in the history
Fix dropdown when setting depth=0 in wp_nav_menu thx @stevygee !
  • Loading branch information
holger1411 committed Dec 18, 2018
2 parents c857dfb + cf4d843 commit bf8cc92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/class-wp-bootstrap-navwalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
// If item has_children add atts to <a>.
if ( isset( $args->has_children ) && $args->has_children && 0 === $depth && $args->depth > 1 ) {
if ( isset( $args->has_children ) && $args->has_children && 0 === $depth && $args->depth !== 1 ) {
$atts['href'] = '#';
$atts['data-toggle'] = 'dropdown';
$atts['aria-haspopup'] = 'true';
Expand Down

0 comments on commit bf8cc92

Please sign in to comment.