/** * @see Westudio_Bootstrap_Menu_Walker */ protected function get_link_attributes($item, $depth, $args, $id) { $attributes = parent::get_link_attributes($item, $depth, $args, $id); $attributes['href'] = home_url() . '#' . wb_url_to_slug($attributes['href']); $attributes['data-target'] = '#' . wb_url_to_slug($attributes['href']); return $attributes; }
/** * @see Westudio_Bootstrap_Menu_Walker */ protected function get_link_after($item, $depth, $args, $id) { $output = parent::get_link_after($item, $depth, $args, $id); if ($depth == 0 && $args->depth != 1 && $args->has_children) { $output .= ' <b class="caret"></b>'; } return $output; }
/** * @see Westudio_Bootstrap_Menu_Walker */ protected function get_item_classes($item, $depth, $args, $id) { $classes = parent::get_item_classes($item, $depth, $args, $id); $classes[] = 'list-group-item'; return $classes; }