Make alternates function public

Because I'd like to use this in a plugin.