mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
add smarty object to function example
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
<?php
|
||||
$smarty->register_function('date_now', 'print_current_date');
|
||||
|
||||
function print_current_date($params)
|
||||
function print_current_date($params, &$smarty)
|
||||
{
|
||||
if(empty($params['format'])) {
|
||||
$format = "%b %e, %Y";
|
||||
|
Reference in New Issue
Block a user