mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 08:22:17 +00:00
add function generateCSSsIncludeIfExtensionCssExists and use to load additional tag.css from extensions if exists
This commit is contained in:
@@ -270,6 +270,28 @@ function absoluteJsImportUrl($relurl)
|
||||
return $url;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate Css File Include if Extension contains file
|
||||
*
|
||||
* @param $relativeFilePath path relative to Extension public/css dir
|
||||
*/
|
||||
function generateCSSsIncludeIfExtensionCssExists($relativeFilePath)
|
||||
{
|
||||
$fsiterator = new FilesystemIterator(FHCPATH . 'application/extensions');
|
||||
foreach ($fsiterator as $fsitem)
|
||||
{
|
||||
if(preg_match('/^FHC-Core-/', $fsitem->getBasename()))
|
||||
{
|
||||
$extensionfile = 'public/extensions/' . $fsitem->getBasename()
|
||||
. '/css/' . $relativeFilePath;
|
||||
if(is_readable(FHCPATH . $extensionfile))
|
||||
{
|
||||
generateCSSsInclude($extensionfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Manipulate CI views includes Array to load
|
||||
* - public/js/FhcApps.js via customJSs and
|
||||
|
||||
@@ -132,7 +132,11 @@
|
||||
if ($cis === true) generateCSSsInclude(defined('CIS4') ? 'public/css/cis4.css' : 'public/css/cis_bs5.css');
|
||||
|
||||
//Tags
|
||||
if ($tags === true) generateCSSsInclude('public/css/tags.css');
|
||||
if ($tags === true)
|
||||
{
|
||||
generateCSSsInclude('public/css/tags.css');
|
||||
generateCSSsIncludeIfExtensionCssExists('tags.css');
|
||||
}
|
||||
|
||||
$extapphelper = ExtendableAppsHelper::getInstance();
|
||||
$extapphelper->init($customCSSs, $customJSs, $customJSModules);
|
||||
|
||||
Reference in New Issue
Block a user