Ejemplo n.º 1
0
 public static function hook_plugins_loaded()
 {
     $available_themes = self::get_available_themes();
     self::$current_theme = self::get_current_theme();
     $current_theme = basename(self::$current_theme);
     if (strlen($current_theme) > 2 && isset($available_themes[$current_theme])) {
         // we have an active theme!
         self::$current_theme_settings = $available_themes[$current_theme];
         $file = isset(self::$current_theme_settings['init_file']) ? self::$current_theme_settings['init_file'] : false;
         if ($file && is_file($file)) {
             include $file;
         }
     }
     $display_mode = get_display_mode();
     if ($display_mode != 'mobile') {
         module_theme::$current_theme_styles = module_theme::get_theme_styles(module_theme::$current_theme);
         module_config::register_css('theme', 'theme.php', full_link(_EXTERNAL_TUNNEL_REWRITE . 'm.theme/h.css?uniq=' . md5(serialize(array(self::$current_theme_settings, module_theme::$current_theme_styles)))), 100);
     }
     if ($display_mode == 'iframe') {
         module_config::register_css('theme', 'iframe.css', true, 100);
     }
 }