Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (26 sloc) 536 Bytes
<?php
/**
* Smarty block plugin
*
* Plugin that removes white spaces from beginning and end of a string.
*
* Example:
* <code>
* <h2>{trim} Welcome Beda {/trim}</h2>
* </code>
*
* outputs:
* <code><h2>Welcome Beda</h2></code>
*
* @package Atk14
* @subpackage Helpers
*/
/**
* Smarty block function.
*
* Removes white spaces from beginning and end of a string. Does not recognize any parameters.
*/
function smarty_block_trim($params, $content, $template, &$repeat){
if($repeat){ return; }
return trim($content);
}
You can’t perform that action at this time.