Merge pull request #859 from stevygee/master
Fix dropdown when setting depth=0 in wp_nav_menu thx @stevygee !
This commit is contained in:
commit
bf8cc921a9
|
@ -185,7 +185,7 @@ if ( ! class_exists( 'Understrap_WP_Bootstrap_Navwalker' ) ) {
|
||||||
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
|
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
|
||||||
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
|
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
|
||||||
// If item has_children add atts to <a>.
|
// 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['href'] = '#';
|
||||||
$atts['data-toggle'] = 'dropdown';
|
$atts['data-toggle'] = 'dropdown';
|
||||||
$atts['aria-haspopup'] = 'true';
|
$atts['aria-haspopup'] = 'true';
|
||||||
|
|
Reference in New Issue