From d1ab865ccf8a9200236e310c93ad56b8a7f93aad Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 28 Nov 2013 19:17:20 -0800 Subject: make the template processor (e.g. replace_macros) pluggable --- include/text.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/text.php b/include/text.php index 54626a772..3d15a5c6b 100755 --- a/include/text.php +++ b/include/text.php @@ -15,8 +15,11 @@ require_once("include/friendica_smarty.php"); function replace_macros($s,$r) { $a = get_app(); + $arr = array('template' => $s, 'params' => $r); + call_hooks('replace_macros', $arr); + $t = $a->template_engine(); - $output = $t->replace_macros($s,$r); + $output = $t->replace_macros($arr['template'],$arr['params']); return $output; } -- cgit v1.2.3