Skip to content

Commit f592e27

Browse files
committed
Fix dropdown opener having empty string for href value.
Fixes: #345
1 parent 6620271 commit f592e27

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#CHANGELOG
2+
## [4.0.2]
3+
- Fix dropdown opener having empty string for href value.
24

35
## [4.0.1]
46
- Fix untranslated string in fallback (this was lost in transition between v3 and v4, fixed again).

class-wp-bootstrap-navwalker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Plugin URI: https://github.com/wp-bootstrap/wp-bootstrap-navwalker
1212
* Description: A custom WordPress nav walker class to implement the Bootstrap 4 navigation style in a custom theme using the WordPress built in menu manager.
1313
* Author: Edward McIntyre - @twittem, WP Bootstrap, William Patton - @pattonwebz
14-
* Version: 4.0.1
14+
* Version: 4.0.2-dev
1515
* Author URI: https://github.com/wp-bootstrap
1616
* GitHub Plugin URI: https://github.com/wp-bootstrap/wp-bootstrap-navwalker
1717
* GitHub Branch: master
@@ -189,7 +189,7 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
189189
$atts['class'] = 'dropdown-toggle nav-link';
190190
$atts['id'] = 'menu-item-dropdown-' . $item->ID;
191191
} else {
192-
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
192+
$atts['href'] = ! empty( $item->url ) ? $item->url : '#';
193193
// Items in dropdowns use .dropdown-item instead of .nav-link.
194194
if ( $depth > 0 ) {
195195
$atts['class'] = 'dropdown-item';

0 commit comments

Comments
 (0)