I tried creating this by inserting the devel switcher as part of user-counter in admin_menu.inc -> function admin_menu_links_users()
// CUSTOM devel switcher for user counter
// Add Devel module switch user links.
$switch_links = module_invoke('devel', 'switch_user_list');
if (!empty($switch_links) && count($switch_links) > 1) {
foreach ($switch_links as $uid => $link) {
$links['user-counter'][$link['title']] = array(
'#title' => $link['title'],
'#description' => $link['attributes']['title'],
'#href' => $link['href'],
'#options' => array(
'query' => $link['query'],
'html' => !empty($link['html']),
),
);
}
}but discovered the href (title) of user names get's overwritten by admin_menu.module -> admin_menu_admin_menu_replacements($complete)
if (!empty($components['admin_menu.users']) && ($user_count = admin_menu_get_user_count())) {
// Replace the counters in the cached menu output with current counts.
$items['.admin-menu-users a'] = $user_count;
}Any way I could get around this? So that the overwrite only affect the first a and not the other ones from devel switcher?
I understand the usercount refresh is obviously essential :)
Comments