From: Jason Woofenden Date: Fri, 20 Nov 2009 06:24:31 +0000 (-0500) Subject: added tem_auto_nonempty() X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=commitdiff_plain;h=bd1f2c2ee4f8edf6139b811ec3fe746700409723 added tem_auto_nonempty() --- diff --git a/template.php b/template.php index 9a512a6..396819d 100644 --- a/template.php +++ b/template.php @@ -325,6 +325,14 @@ function tem_auto_show(&$value) { return $value; } +# 'nonempty' sections will not be shown if the corresponding data +# value is the empty string + +function tem_auto_nonempty(&$value) { + if($value === '') $value = null; + return $value; +} + # 'evenodd' sections are given an 'evenodd' attribute whose value # alternates between 'even' and 'odd'.