function menu_attributes_menu_link_alter in Menu Attributes 6
Same name and namespace in other branches
- 6.2 menu_attributes.module \menu_attributes_menu_link_alter()
- 7 menu_attributes.module \menu_attributes_menu_link_alter()
Implements hook_menu_link_alter().
File
- ./
menu_attributes.module, line 27 - Alters the menu item form to allow the administrator to specify additional attributes for the menu link
Code
function menu_attributes_menu_link_alter(&$item, $menu) {
if (isset($item['options']['attributes']) && is_array($item['options']['attributes'])) {
// Filter out blank attributes.
$item['options']['attributes'] = array_filter($item['options']['attributes'], 'drupal_strlen');
}
}