mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 00:11:49 +03:00
0201c431d7
* 🎨 🔥 do not store settings in config and make settings cache easier available - remove remembering settings value in theme config - if we need a cache value, we are asking the settings cache directly - instead of settings.getSettingSync we use settings.cache.get - added TODO: - think about moving the settings cache out of api/settings - we could create a folder named cache cache/settings - this settings cache listens on model changes for settings - decoupling * 🔥 remove timezone from config - no need to store in overrides config and in defaults settings * 🎨 context object helper - replace config.get('theme') by settings cache * 🎨 replace config.get('theme') by settings.cache.get * 🎨 adapt tests * fixes from comments
10 lines
267 B
JavaScript
10 lines
267 B
JavaScript
var settingsCache = require('../api/settings').cache,
|
|
flagIsSet;
|
|
|
|
flagIsSet = function flagIsSet(flag) {
|
|
var labsConfig = settingsCache.get('labs');
|
|
return labsConfig && labsConfig[flag] && labsConfig[flag] === true;
|
|
};
|
|
|
|
module.exports.isSet = flagIsSet;
|