[gnome-web-www: 60/68] Make the parent link of a dropdown click through to a url, instead of opening it
- From: Tom Tryfonidis <tomtryf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-web-www: 60/68] Make the parent link of a dropdown click through to a url, instead of opening it
- Date: Tue, 24 Jan 2017 15:52:15 +0000 (UTC)
commit ce98936a1dd9efcede0531cc824dc847a771d63a
Author: Tom Tryfonidis <tomtryf gnome org>
Date: Tue Jan 24 14:38:07 2017 +0200
Make the parent link of a dropdown click through to a url, instead of opening it
We don't want the default behaviour of the walker for our Foundation submenu.
The Foundation submenu is handled with JQuery, so Bootstrap's data-toggle is also disabled.
theme/lib/wp-bootstrap-navwalker.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/theme/lib/wp-bootstrap-navwalker.php b/theme/lib/wp-bootstrap-navwalker.php
index 36b770d..0d43c56 100644
--- a/theme/lib/wp-bootstrap-navwalker.php
+++ b/theme/lib/wp-bootstrap-navwalker.php
@@ -103,8 +103,8 @@ if ( ! class_exists( 'WP_Bootstrap_Navwalker' ) ) {
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
// If item has_children add atts to a.
if ( $args->has_children && 0 === $depth ) {
- $atts['href'] = '#';
- $atts['data-toggle'] = 'dropdown';
+ $atts['href'] = ! empty( $item->url ) ? $item->url
: '';
+ //$atts['data-toggle'] = 'dropdown';
$atts['class'] = 'dropdown-toggle';
$atts['aria-haspopup'] = 'true';
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]