custom function moved form system/core/common.php function_helper.php