$smarty->trigger_error(__FUNCTION__ .": illegal hook '". $params['hook'] ."'");
return;
}
+
+ // Smarty hooks can be bypassed via an internal variable (temporarily)
+ if (isset($serendipity['skip_smarty_hooks']) && $serendipity['skip_smarty_hooks']) {
+ return;
+ }
+
+ // A specific hook can also be bypassed by creating an associative array like this:
+ // $serendipity['skip_smarty_hook'] = array('entries_header');
+ // That would only skip the entries_header event hook, but allow all others.
+ // Of course it cannot be used in conjunction with the all-blocking skip_smarty_hooks.
+ if (isset($serendipity['skip_smarty_hook']) && is_array($serendipity['skip_smarty_hook']) && isset($serendipity['skip_smarty_hook'][$params['hook']])) {
+ return;
+ }
if (!isset($params['data'])) {
$params['data'] = &$serendipity;