]> git.mxchange.org Git - mailer.git/blobdiff - inc/wrapper-functions.php
New (template) wrapper function fixEmptyContentToDashes() introduced, EL rewrites:
[mailer.git] / inc / wrapper-functions.php
index fdd6be73f4f2ecf713c5ced74d8de4feb2178334..df22a69ec048c2be90c1dedc38bd08ec5b937f1d 100644 (file)
@@ -1073,5 +1073,17 @@ function encodeEntities ($str) {
        return $str;
 }
 
+// "Fixes" an empty string into three dashes (use for templates)
+function fixEmptyContentToDashes ($str) {
+       // Trim the string
+       $str = trim($str);
+
+       // Is the string empty?
+       if (empty($str)) $str = '---';
+
+       // Return string
+       return $str;
+}
+
 // [EOF]
 ?>