diff --git a/htdocs/public/webportal/css/themes/custom.css.php b/htdocs/public/webportal/css/themes/custom.css.php index bec2de3b4c3..cb30f91bf21 100644 --- a/htdocs/public/webportal/css/themes/custom.css.php +++ b/htdocs/public/webportal/css/themes/custom.css.php @@ -48,6 +48,13 @@ session_cache_limiter('public'); require_once __DIR__.'/../../webportal.main.inc.php'; dol_include_once('/webportal/class/webPortalTheme.class.php'); +/** + * @var Conf $conf + * @var HookManager $hookmanager + * @var Translate $langs + * @var Context $context + */ + // Define css type top_httphead('text/css'); /* @@ -85,5 +92,10 @@ $webPortalTheme = new WebPortalTheme(); } initHooks(array('webPortalCustomCss')); +$parameters = array(); +$hookmanager->executeHooks('webPortalCustomCss', $parameters, $webPortalTheme); +print $hookmanager->resPrint; + print '/* Here, the content of the common custom CSS defined into Home - Setup - Display - CSS */'."\n"; print getDolGlobalString('WEBPORTAL_CUSTOM_CSS'); diff --git a/htdocs/public/webportal/tpl/header.tpl.php b/htdocs/public/webportal/tpl/header.tpl.php index 61db0659cfa..9e0cefc06fb 100644 --- a/htdocs/public/webportal/tpl/header.tpl.php +++ b/htdocs/public/webportal/tpl/header.tpl.php @@ -18,6 +18,7 @@ /** * @var Context $context Object context for webportal + * @var HookManager $hookmanager * @var Translate $langs * @@var string[] $vars['body-class'] more CSS classes for body * @@var string[] $vars['body-theme'] theme css to apply default is custom @@ -101,8 +102,13 @@ top_httphead(); $bodyAttributes['class'] = $vars['body-class']; } - $bodyCompiledAttributes = commonHtmlAttributeBuilder($bodyAttributes); + $parameters = array( + 'bodyAttributes' => &$bodyAttributes + ); + $hookmanager->executeHooks('webPortalHeader', $parameters, $context); + print $hookmanager->resPrint; + $bodyCompiledAttributes = commonHtmlAttributeBuilder($bodyAttributes); ?> >