') where it used to repeat the markup. * * $active is one of the ADMIN_NAV_LINKS keys, or 'account' for the * My Account page (which highlights the username link instead). */ const ADMIN_NAV_LINKS = [ // key => [href, label, admin-only] 'announcements' => ['index.php', 'Announcements', false], 'menu' => ['menu.php', 'Menu', false], 'users' => ['users.php', 'Users', true], 'hours' => ['hours.php', 'Hours', false], ]; function render_admin_nav(array $user, string $active): void { $isAdmin = ($user['role'] ?? '') === 'admin'; $current = static fn (string $key): string => $key === $active ? ' class="active" aria-current="page"' : ''; ?>