]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
This 'return FALSE' caused that the PHP's error handler was called :( So, do NEVER...
[mailer.git] / inc / template-functions.php
index 7bfe4b9ddda0b4d012fe98f5c6f9c9f122901fae..208c2f21267780c53be2bf487f72bd1284fe0847 100644 (file)
@@ -2239,6 +2239,18 @@ function doTemplatePointsPaymentMethodSelectionBox ($templateName, $clear = FALS
        return $content;
 }
 
+// Template helper function to create a deferrer code if URL is not empty
+function doTemplateDereferrerUrl ($templateName, $clear = FALSE, $url = NULL) {
+       // Is the URL not NULL and not empty?
+       if ((!is_null($url)) && (!empty($url))) {
+               // Set HTML with EL code
+               $url = '<a href="{%pipe,generateDereferrerUrl=' . $url . '%}" rel="external" target="_blank">{--ADMIN_TEST_URL--}</a>';
+       } // END - if
+
+       // Return URL (or content) or dashes if empty
+       return fixEmptyContentToDashes($url);
+}
+
 // Tries to anonymize some sensitive data (e.g. IP address, user agent, referrer, etc.)
 function anonymizeSensitiveData ($data) {
        // Trim it