[PR] Extend the CMS template footer to allow platform scripts

A few things are used in `wp_footer()` by the platform that should remain. This strips the `</body>` included in the template so that we can continue adding data before closing the document.