fixed dropdown bug

when a dropdown parent contains a link itself, a data-target="#" is needed
This commit is contained in:
Linus Metzler
2012-08-26 22:36:30 +03:00
parent 181e9f7a68
commit b9cc398396

View File

@@ -471,7 +471,7 @@ class Roots_Nav_Walker extends Walker_Nav_Menu {
$attributes .= ! empty($item->target) ? ' target="' . esc_attr($item->target ) .'"' : '';
$attributes .= ! empty($item->xfn) ? ' rel="' . esc_attr($item->xfn ) .'"' : '';
$attributes .= ! empty($item->url) ? ' href="' . esc_attr($item->url ) .'"' : '';
$attributes .= ($args->has_children) ? ' class="dropdown-toggle" data-toggle="dropdown"' : '';
$attributes .= ($args->has_children) ? ' class="dropdown-toggle" data-toggle="dropdown" data-target="#"' : '';
$item_output = $args->before;
$item_output .= '<a'. $attributes .'>';