Beautify WordPress HTML output without any plugins
Great question, I asked it myself and here’s what I came up with. You can just use this in a custom plugin or in functions.php. // turn on Output Buffering (hence *ob*) ob_start(); // register a callback to run after WordPress has outputed everything add_action(‘shutdown’, function () { // get the output buffer and store … Read more