/** * Stores the name of the active theme to use. This theme should be relative * to one of the 'template.theme_paths' folders. * * @param string $theme The name of the active theme. * @param string $default_theme (Optional) The name of the desired default theme. * * @return void */ public static function set_theme($theme = null, $default_theme = null) { if (empty($theme) || !is_string($theme)) { return; } // Make sure a trailing slash is there if (substr($theme, -1) !== '/') { $theme .= '/'; } self::$active_theme = $theme; // Default theme? if (!empty($default_theme) && is_string($default_theme)) { self::set_default_theme($default_theme); } }
public static function set_theme($theme=null) { if (empty($theme) || !is_string($theme)) { return; } // Make sure a trailing slash is there if (substr($theme, -1) !== '/') { $theme .= '/'; } self::$active_theme = $theme; }