Hello all, i recently converted my theme to Drupal 7, but i came across a issue that i can't solve myself, i need to add a new span element inside the li element, but i can't do it cause i lack the knowledge... The code below demonstrates how it has to be and how its right now...
API reference:
http://api.drupal.org/api/function/theme_menu_local_task/7
The code like it has to be:
<ul class="tabs">
<li class=active><a class="active" href="link here">
<span class="tabs">tab title here</span>
<span class="element-invisible">active</span>
</a>
</li>
</ul>
this is the code how its right now:
<ul class="tabs">
<li class=active><a class="active" href="link here">tab title here
<span class="element-invisible">active</span>
</a>
</li>
</ul>
This is the code that adds the "invisible-element" class in the theme, the class is only added when the tab is active, otherwise not! Now i also want to add a other span class, but i want it to be there even if the tab is not active...
<?php
function ashladan_menu_local_task($variables) {
$link = $variables['element']['#link'];
$link_text = $link['title'];
if (!empty($variables['element']['#active'])) {
// Add text to indicate active tab for non-visual users.
$active = '' . t('(active tab)') . '';