/** * Returns themes array * * @return array */ public static function get_themes_by_key() { $themes = array(); $wp_themes = Util_Theme::get_themes(); foreach ($wp_themes as $wp_theme) { $theme_key = Util_Theme::get_theme_key($wp_theme['Theme Root'], $wp_theme['Template'], $wp_theme['Stylesheet']); $themes[$theme_key] = $wp_theme['Name']; } return $themes; }
/** * Returns current theme * * @return string */ function get_theme() { static $theme = null; if ($theme === null) { $theme = Util_Theme::get_theme_key(get_theme_root(), get_template(), get_stylesheet()); } return $theme; }