Init basic Smarty when requesting CSS (Fixes #204)
In order to be able to call `serendipity_plugin_api_pre_event_hook` in a template's config.ini.php from serendipity.css.php, Smarty must be initialized first. In case of a 'css' event, within the event hook $eventData contains the template's CSS which can now be manipulated and/or extended.
This commit is contained in:
parent
8002559603
commit
959022fa07
@ -548,6 +548,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
$serendipity['GET']['searchTerm'] = urldecode(htmlspecialchars(strip_tags(implode(' ', $search))));
|
||||
include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
|
||||
} elseif (preg_match(PAT_CSS, $uri, $matches)) {
|
||||
serendipity_smarty_init();
|
||||
$serendipity['view'] = 'css';
|
||||
$css_mode = $matches[1];
|
||||
include(S9Y_INCLUDE_PATH . 'serendipity.css.php');
|
||||
|
Loading…
x
Reference in New Issue
Block a user