function tft_theme_folder_menu_links in Taxonomy File Tree 7.2
Helper function to render the operation links.
Parameters
array $links:
Return value
string
Related topics
2 calls to tft_theme_folder_menu_links()
- tft in includes/
tft.pages.inc - Page callback: file content list.
- tft_ajax_get_folder in includes/
tft.ajax.inc - Page callback: get folder content via AJAX.
File
- ./
tft.module, line 1067 - Hook implementations and module logic for TFT.
Code
function tft_theme_folder_menu_links($links) {
// We don't use the theme('links') Drupal function, as we want to set custom classes and IDs on the <li>s.
// This is not possible (without a lot of overhead) with theme('links').
$html = '<ul class="tabs primary" id="folder-menu-ops-links">';
foreach ($links as $link) {
$html .= '<li class="folder-menu-ops-link" id="' . (isset($link['attributes']['id']) ? $link['attributes']['id'] : '') . '">';
// Change the ID for the <a>.
if (isset($link['attributes']['id'])) {
$link['attributes']['id'] .= '-link';
}
$html .= l($link['title'], $link['href'], $link);
$html .= '</li>';
}
$html .= '</ul>';
return $html;
}