mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-15 15:09:51 +01:00
Implemented plugin architecture.
This commit is contained in:
18
plugins/modifier.string_format.php
Normal file
18
plugins/modifier.string_format.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Smarty plugin
|
||||
* -------------------------------------------------------------
|
||||
* Type: modifier
|
||||
* Name: string_format
|
||||
* Purpose: format strings via sprintf
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
function smarty_modifier_string_format($string, $format)
|
||||
{
|
||||
return sprintf($format, $string);
|
||||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user