public static function get($key, $preferGlobal = false)
    {
        if (!self::$_initiated) {
            self::init();
        }

        if (!isset(self::$_config[$key])) {
            return null;
        }

        foreach (self::$modes as $mode) {
            if (isset(self::$modeSettings[$mode][$key])) {
                return self::$modeSettings[$mode][$key];
            }
        }

        if (!$preferGlobal && self::$_CurrentHTMLInstance && isset(self::$_CurrentHTMLInstance->$key)) {
            return self::$_CurrentHTMLInstance->$key;
        } else {
            if (class_exists('Xiphe\THEMASTER\core\THE')
                && class_exists(TM\THE::WPSETTINGS)
            ) {
                try {
                    return TM\THEWPSETTINGS::sGet_setting($key, XIPHE_HTML_TEXTID);
                } catch(\Exception $c) {
                    return self::$_config[$key];
                }
            }
            return self::$_config[$key];
        }
    }