JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
add tem_auto_unset()
[wfpl.git] / template.php
index 87305ce..90a2533 100644 (file)
@@ -331,6 +331,17 @@ function tem_auto_nonempty(&$value) {
        return $value;
 }
 
+# 'not' sections will not be shown if the corresponding data
+# value is not set (opposite of default)
+function tem_auto_unset(&$value) {
+       if($value === null) {
+               $value = '';
+       } else {
+               $value = null;
+       }
+       return $value;
+}
+
 # 'evenodd' sections are given an 'evenodd' attribute whose value
 # alternates between 'even' and 'odd'.
 function tem_auto_evenodd(&$values) {