. */ /** * Class Theme - provide access to the current theme. */ class Theme { /** @var BaseTheme The current theme*/ private static $theme; /** @var BaseTheme[] All currently installed themes */ private static $installed_themes; /** * Create a list of all themes available on the system, including * any custom themes. * * @return BaseTheme[] */ public static function installedThemes() { if (self::$installed_themes === null) { self::$installed_themes = array(); foreach (glob(WT_ROOT . '/themes/*/theme.php') as $theme_path) { $theme = require $theme_path; // Themes beginning with an underscore are reserved for special use. if (substr_compare($theme->themeId(), '_', 0, 1) !== 0) { self::$installed_themes[] = $theme; } } } return self::$installed_themes; } /** * An associative array of theme names, for