| 1: | <?php
|
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: |
|
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: |
|
| 23: | function smarty_modifiercompiler_wordwrap($params, Smarty_Internal_TemplateCompilerBase $compiler)
|
| 24: | {
|
| 25: | if (!isset($params[ 1 ])) {
|
| 26: | $params[ 1 ] = 80;
|
| 27: | }
|
| 28: | if (!isset($params[ 2 ])) {
|
| 29: | $params[ 2 ] = '"\n"';
|
| 30: | }
|
| 31: | if (!isset($params[ 3 ])) {
|
| 32: | $params[ 3 ] = 'false';
|
| 33: | }
|
| 34: | $function = 'wordwrap';
|
| 35: | if (Smarty::$_MBSTRING) {
|
| 36: | $function = $compiler->getPlugin('mb_wordwrap', 'modifier');
|
| 37: | }
|
| 38: | return $function . '(' . $params[ 0 ] . ',' . $params[ 1 ] . ',' . $params[ 2 ] . ',' . $params[ 3 ] . ')';
|
| 39: | }
|
| 40: | |