getSelected()) { $item->setItemClass('elgg-state-selected'); $link_class = 'elgg-menu-opened'; } $children = $item->getChildren(); if ($children) { $item->addLinkClass($link_class); $item->addLinkClass('elgg-menu-parent'); } $item_class = $item->getItemClass(); if (isset($vars['item_class']) && $vars['item_class']) { $item_class .= ' ' . $vars['item_class']; } echo "