diff -u b/menu_attributes.module b/menu_attributes.module --- b/menu_attributes.module +++ b/menu_attributes.module @@ -410,12 +410,14 @@ * Implements hook_theme_registry_alter(). */ function menu_attributes_theme_registry_alter(&$registry) { - array_unshift($registry['menu_tree']['preprocess functions'], 'menu_attributes_prepreprocess_menu_tree'); - $registry['menu_tree']['function'] = 'menu_attributes_menu_tree'; + if ($registry['menu_tree']['function'] == 'theme_menu_tree') { + array_unshift($registry['menu_tree']['preprocess functions'], 'menu_attributes_prepreprocess_menu_tree'); + $registry['menu_tree']['function'] = 'menu_attributes_menu_tree'; + } } /** - * Prepares variables for theme_menu_tree(). + * Implements hook_preproces_menu_tree(). */ function menu_attributes_prepreprocess_menu_tree(&$variables) { $first_element_key = current(element_children($variables['tree']));