function user_menu_avatar_preprocess_menu in User Menu Avatar (User Image in Menu) 8.5
Same name and namespace in other branches
- 8.4 user_menu_avatar.module \user_menu_avatar_preprocess_menu()
Implements hook_preprocess_hook().
@inheritdoc
File
- ./
user_menu_avatar.module, line 253 - Display user picture and/or user name in menu.
Code
function user_menu_avatar_preprocess_menu(&$variables) {
// Check we have anything to replace.
if (uma_ImageURL() || uma_UserName()) {
// Loop through first menu level.
foreach ($variables['items'] as &$key) {
uma_apply_markup($variables, $key);
}
}
}