init
[garradin.git] / include / libs / template_lite / plugins / modifier.default.php
1 <?php
2 /**
3 * template_lite default modifier plugin
4 *
5 * Type: modifier
6 * Name: default
7 * Purpose: designate default value for empty variables
8 * Credit: Taken from the original Smarty
9 * http://smarty.php.net
10 */
11 function tpl_modifier_default($string, $default = '')
12 {
13 if (!isset($string) || $string === '')
14 {
15 return $default;
16 }
17 else
18 {
19 return $string;
20 }
21 }
22 ?>