add_to_footer() improvement (Roadmap item #1476)

https://www.php-fusion.co.uk/infusions/roadmap/view.php?item_id=1476