Ported theme-specific loader logic.