Generate HTML in WordPress without the mess
A client wanted a shortcode to highlight reader comments, but the inherited code crammed all the HTML into the shortcode function. Moving it into a dedicated generator class and a separate template file keeps the markup out of the PHP.