Menus, so * adding one no longer means editing this file - and every theme shares the * same navigation instead of carrying its own copy. * * The markup is still entirely this theme's business: theme_menu_items() only * hands over the data, already filtered for the current visitor. An entry * marked "Admins only" is absent from the array, not hidden with CSS. * * A theme that would rather hardcode its menu simply does not call this. */ $menuItems = theme_menu_items('main'); $menuLive = function_exists('theme_menu_available') ? theme_menu_available() : (bool)$menuItems; $menuLabel = static function ($value): string { return htmlspecialchars(function_exists('theme_menu_label') ? theme_menu_label((string)$value) : (string)$value, ENT_QUOTES, 'UTF-8'); }; // A site that has not run the menu migration yet gets the old hardcoded links, // so upgrading never leaves someone with no navigation at all. $menuFallback = !$menuLive; ?>