$i ]; $r["type"] = "marefriends"; return $r; }, $member["_metadata"]["marefriends"] ?? []), ...array_map(function ($i) { $r = [ "name" => $i ]; $r["type"] = "sisters"; return $r; }, $member["_metadata"]["sisters"] ?? []), ...array_map(function ($i) { $r = [ "name" => $i ]; $r["type"] = "caretaking"; return $r; }, $member["_metadata"]["caretakers"] ?? []) ] as $rel) { $id = $rel["name"]; $otherMember = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); $parts = [ $member["id"], $otherMember["id"] ]; asort($parts); $relations[implode("-", $parts)] = [ "id" => implode("", $parts), "name" => getMiniName($member["display_name"] ?? $member["name"]) . " and " . getMiniName($otherMember["display_name"] ?? $otherMember["name"]), "type" => $rel["type"], "images" => [ getAsset($member['system'], $member["id"], "heads"), getAsset($otherMember['system'], $otherMember["id"], "heads") ] ]; } } $nicknames = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/nicknames/nicknames.json"), true); ?>

Relations nicknames