function admin_menu_links_users in Administration menu 8.3
Same name and namespace in other branches
- 7.3 admin_menu.inc \admin_menu_links_users()
Builds user counter.
See also
1 call to admin_menu_links_users()
- admin_menu_output in ./
admin_menu.module - Build the administration menu output.
File
- ./
admin_menu.inc, line 571 - Menu builder functions for Administration menu.
Code
function admin_menu_links_users() {
$links = [
'#theme' => 'admin_menu_links',
'#wrapper_attributes' => [
'id' => 'admin-menu-users',
],
'#weight' => 150,
];
// Add link to show current authenticated/anonymous users.
$links['user-counter'] = [
'#title' => admin_menu_get_user_count(),
'#description' => t('Current anonymous / authenticated users'),
'#weight' => -90,
'#attributes' => [
'class' => [
'admin-menu-action',
'admin-menu-users',
],
],
'#href' => user_access('administer users') ? 'admin/people/people' : 'user',
];
return $links;
}