6 * @subpackage PluginsModifierCompiler
10 * Smarty wordwrap modifier plugin
14 * Purpose: wrap a string of text at a given length
16 * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual)
18 * @param array $params parameters
19 * @return string with compiled code
21 function smarty_modifiercompiler_wordwrap($params, $compiler)
23 if (!isset($params[1])) {
26 if (!isset($params[2])) {
29 if (!isset($params[3])) {
32 return 'wordwrap(' . $params[0] . ',' . $params[1] . ',' . $params[2] . ',' . $params[3] . ')';