I have a custom Menu called "Footer", the machine readable name is "menu-footer". And I want override the theme_menu_tree() function for the menu. My theme name is "abc", so I tried abc_menu_tree__menu_footer() and it is not working. But modifying abc_menu_tree() is working, so it must have to do with the overriding of custom menus.
I checked this Question but it doesn't work. Is there anything I need to do in order to allow overriding for custom menus?
Thanks for your help in advance.
Edit:
The code of the function:
function abc_menu_tree__menu_footer($variables) {
return '<nav class="sub-navigation"><ul>' . $variables['tree'] . '</ul></nav>';
}
abc_menu_link__menu_footer() can't be overridden too. In abc_menu_link() you are able to check context, so this is not a big problem. If I check if the theme of the element is "menu_link__menu_footer" it is working for the menu links.
Edit2:
I can't override abc_menu_tree for the main menu too. abc_menu_tree__main_menu is not working.