function menu_minipanels_theme_links in Menu Minipanels 6
This replacement theme function adds minipanels support to theme_links() without disturbing themes that may also implement this theme function.
See also
menu_minipanels_theme_registry_alter().
menu_minipanels_prepare_links().
1 string reference to 'menu_minipanels_theme_links'
- menu_minipanels_theme_registry_alter in ./
menu_minipanels.module - Implements hook_theme_registry_alter().
File
- ./
menu_minipanels.module, line 372 - Allows an administrator to specify a minipanel to be associated with a Drupal menu item. When that menu item is hovered or clicked (as per config), the minipanel content will be shown using the qTip javascript library.
Code
function menu_minipanels_theme_links($links, $attributes = array(
'class' => 'links',
)) {
foreach ($links as &$link) {
if (!empty($link['minipanel'])) {
$prefix = '';
if (!empty($link['attributes']['class'])) {
$prefix = $link['attributes']['class'] . ' ';
}
// Only set the class names, don't include the code. That has already
// been done earlier in @menu_minipanels_prepare_links().
$link['attributes']['class'] = $prefix . _menu_minipanels_link_class_name($link['menu_minipanels_hover']['mlid']);
}
}
return theme('menu_minipanels_theme_links_default', $links);
}