As you know default wrapper for menu item in drupalDrupal 7 can be modified via function theme_menu_link().
** theme is the name of theme
by overriding
theme_menu_link($variables) {}
function we can modify the rendered html output of menu link but it will change all of menu items that their #theme attribute is set to this function. for example in main menu, each item has menu_link__main_menu value in it's #theme attribute.
Now I want to create a custom wrapper function in my theme.
I searched and I found I must create a function with structure like
theme_menu_link($variables) {}
and also I must REGISTER the function name in my theme.
For registration, I used function theme_theme() {}
function theme_theme() {return array('custom_menu_item_wrapper' => array());}
** theme is replaced by name of theme ** custom_menu_item_wrapper is the name of my function for wrapping operation
But I don't know, how should I define parameters in theme function registration because when custom_menu_item_wrapper($variables) function is called $variables is NULL
Please guide me.
Thanks a lot.