mirror of
https://github.com/flextype/flextype.git
synced 2025-08-11 23:54:06 +02:00
Themes updates
This commit is contained in:
@@ -69,18 +69,18 @@ class Themes
|
||||
Registry::set('themes', []);
|
||||
|
||||
// Create Unique Cache ID for Theme
|
||||
$theme_cache_id = md5('theme' . filemtime(PATH['themes'] .'/'. $theme . '/' . 'blueprints.yaml') .
|
||||
$theme_cache_id = md5('theme' . filemtime(PATH['themes'] .'/'. $theme . '/' . 'settings.yaml') .
|
||||
filemtime(PATH['themes'] .'/'. $theme . '/' . $theme . '.yaml'));
|
||||
|
||||
// Get Theme mafifest file and write to site.themes array
|
||||
if (Cache::contains($theme_cache_id)) {
|
||||
Registry::set('themes.'.Registry::get('system.theme'), Cache::fetch($theme_cache_id));
|
||||
} else {
|
||||
if (Filesystem::fileExists($theme_blueprints = PATH['themes'] . '/' . $theme . '/' . 'blueprints.yaml') and
|
||||
if (Filesystem::fileExists($theme_settings = PATH['themes'] . '/' . $theme . '/' . 'settings.yaml') and
|
||||
Filesystem::fileExists($theme_config = PATH['themes'] . '/' . $theme . '/' . $theme . '.yaml')) {
|
||||
$theme_blueprints = Yaml::parseFile($theme_blueprints);
|
||||
$theme_settings = Yaml::parseFile($theme_settings);
|
||||
$theme_config = Yaml::parseFile($theme_config);
|
||||
$_theme = array_merge($theme_blueprints, $theme_config);
|
||||
$_theme = array_merge($theme_settings, $theme_config);
|
||||
Registry::set('themes.'.Registry::get('system.theme'), $_theme);
|
||||
Cache::save($theme_cache_id, $_theme);
|
||||
}
|
||||
|
Reference in New Issue
Block a user