Hook Function to Footer I would like to know how to hook a function in the footer area right before the &lt;/body&gt; tag. The function would produce html.

function html_footer(){
    does stuff
}
places_in_footer('html_footer()');


I've done some research on the subject but it seems like there are a lot of different methods but all of them are deprecated. So I'm not sure what the right method would be. 

For example in wordpress it would be:

function your_function() {
    echo '&lt;p&gt;This is inserted at the bottom&lt;/p&gt;';
}
add_action( 'wp_footer', 'your_function' );
You can create one block and add the html content and place this block in the footer region. This content will place inside the  tag and after the main content. Thats mean you will get your content before the closing  tag.