function menu_minipanels_theme_link in Menu Minipanels 7
Same name and namespace in other branches
- 7.2 menu_minipanels.module \menu_minipanels_theme_link()
This replacement theme function adds minipanels support to theme_link() without disturbing themes that may also implement this function.
See also
menu_minipanels_theme_registry_alter()
1 string reference to 'menu_minipanels_theme_link'
- menu_minipanels_theme_registry_alter in ./
menu_minipanels.module - Implements hook_theme_registry_alter().
File
- ./
menu_minipanels.module, line 304 - 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_link($link) {
$matches = array();
if (!empty($link['options']['minipanel'])) {
$prefix = '';
if (empty($link['options']['attributes'])) {
$link['options']['attributes'] = array();
}
if (empty($link['options']['attributes']['class'])) {
$link['options']['attributes']['class'] = array();
}
$link['options']['attributes']['class'][] = _menu_minipanels_include($link['options']['minipanel'], $link['options']['menu_minipanels_hover']);
}
return theme('menu_minipanels_theme_link_default', $link);
}