Is there any filter or hook to print a script or add in the footer some content? I'm not talking about wp_enqueue_
function, I'm creating a plugin that will show a banner for privacy and cookie info and I want to append it to the footer. I'm using at the moment this code, but I hope that there is a more clean wey to do it:
function cookie_privacy_script()
{
<script>
// js code here
</script>
}
add_action('wp_enqueue_scripts', 'cookie_privacy_script');