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