Update tpl_functions.php