Hooks/Action Reference/builder finish


This action is the final action called by Builder before the rendering process ends. Builder latches a function onto this action to close the body and html tags.

The only action to run after this one is the shutdown action that WordPress runs.

Possible Uses

This action is helpful if you want to inject some HTML just before the closing body tag. Simply use a priority less than 10 (I recommend 0 or less) to add content before the closing tags.

If some function must run after all the HTML has been rendered, either WordPress' shutdown action or this action with a priority greater than 10 are good choices. While this wouldn't be useful for rendering content, it could be used to create a caching plugin or to enable output buffering in order to manipulate the resulting HTML before sending it to the browser.



Have more questions? Submit a request
Powered by Zendesk