Update Panopoly Magic and Test for Issue #2496027 by dsnopek: Generate preview markup in a theme function/template