PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/hotebooking.site/wp-content/themes/traveler/inc/core/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : /home/trave494/hotebooking.site/wp-content/themes/traveler/inc/core/class.config.php |
<?php /** * Created by PhpStorm. * User: HanhDo * Date: 3/27/2019 * Time: 8:53 AM */ class ST_Config { protected static $_allConfigs = []; protected static function loadFile($file) { $new_layout = st()->firstGetOption('st_theme_style', 'modern'); $path_origin = get_template_directory() . '/inc/configs/' . $file . '.php'; if ($new_layout == 'modern') { $path = get_template_directory() . '/inc/layouts/modern/configs/' . $file . '.php'; if (file_exists($path)) { $path_origin = $path; } } if (file_exists($path_origin)) { self::$_allConfigs[$file] = (include $path_origin); } } /** * @param $key string format: filename.params.keys * @param $default mixed * @return mixed */ public static function get($key, $default = null) { $explode = explode('.', $key); if (count($explode) < 2) { if (empty(self::$_allConfigs[$explode[0]])) { self::loadFile($explode[0]); return self::$_allConfigs[$explode[0]]; } } if (empty(self::$_allConfigs[$explode[0]])) self::loadFile($explode[0]); if (!isset(self::$_allConfigs[$explode[0]][$explode[1]])) return $default; $return = self::$_allConfigs[$explode[0]][$explode[1]]; for ($i = 2; $i < count($explode); $i++) { $return = isset($return[$explode[$i]]) ? $return[$explode[$i]] : $default; } return $return; } }