function theme_uc_store_block_links in Ubercart 5
1 theme call to theme_uc_store_block_links()
- uc_store_block in uc_store/
uc_store.module - Implementation of hook_block().
File
- uc_store/
uc_store.module, line 1770 - Contains global Ubercart functions and store administration functionality.
Code
function theme_uc_store_block_links($menu) {
if (!($menu['type'] & MENU_VISIBLE_IN_TREE)) {
return '';
}
$depth = count(explode('/', $menu['path']));
$link_title = uc_store_get_icon($menu['path'], TRUE) . ' ' . $menu['title'];
$output = str_repeat(" ", $depth) . '<li>' . l($link_title, $menu['path'], array(), NULL, NULL, FALSE, TRUE);
if (is_array($menu['children']) && !empty($menu['children'])) {
usort($menu['children'], '_menu_sort');
$child_output = '';
foreach ($menu['children'] as $child) {
$child_output .= theme('uc_store_block_links', menu_get_item($child));
}
if ($child_output) {
$output .= "\n" . str_repeat(" ", 2 * $depth + 1) . "<ul>\n";
$output .= $child_output;
$output .= str_repeat(" ", 2 * $depth + 1) . "</ul>\n" . str_repeat(" ", $depth);
}
}
$output .= "</li>\n";
return $output;
}