The function is running every time you use a portal, take a boat/zeplin, enter/leave a battlegournd, arena, order hall etc.
Lua Code:
local frame = CreateFrame("Frame")
frame:SetScript("OnEvent", function()
--big plates with small text
DefaultCompactNamePlateFrameSetUpOptions.useLargeNameFont=false
frame:UnregisterAllEvents()
end)
-- Register for interesting events
frame:RegisterEvent("PLAYER_ENTERING_WORLD")
It could probably be done slightly differently but this will stop the multiple calls.