Commit 9366dba3 authored by Penny Leach's avatar Penny Leach
Browse files

stylesheet setup now looks for plugin stylesheets (based on new constants

in previous commit)
parent e974c6ce
......@@ -210,7 +210,15 @@ EOF;
$smarty->cache_dir = get_config('dataroot').'smarty/cache';
$smarty->assign('THEMEURL', get_config('themeurl'));
$smarty->assign('STYLESHEETLIST', array_reverse(theme_get_url('style/style.css', null, true)));
// stylesheet set up - if we're in a plugin also get its stylesheet
$stylesheets = array_reverse(theme_get_url('style/style.css', null, true));
if (defined('SECTION_PLUGINTYPE') && defined('SECTION_PLUGINNAME') && SECTION_PLUGINTYPE != 'core') {
if ($pluginsheets = theme_get_url('style/style.css', SECTION_PLUGINTYPE . '/' . SECTION_PLUGINNAME . '/', true)) {
$stylesheets = array_merge($stylesheets, array_reverse($pluginsheets));
}
}
$smarty->assign('STYLESHEETLIST', $stylesheets);
$smarty->assign('WWWROOT', $wwwroot);
$smarty->assign('SESSKEY', $USER->get('sesskey'));
$smarty->assign('THEMELIST', json_encode($theme_list));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment