mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-08 08:11:39 +01:00
Implemented plugin architecture.
This commit is contained in:
18
plugins/modifier.replace.php
Normal file
18
plugins/modifier.replace.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Smarty plugin
|
||||
* -------------------------------------------------------------
|
||||
* Type: modifier
|
||||
* Name: replace
|
||||
* Purpose: simple search/replace
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
function smarty_modifier_replace($string, $search, $replace)
|
||||
{
|
||||
return str_replace($search, $replace, $string);
|
||||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user