/** * @static * Ensure that all theme variables are populated * @param $use_cache boolean If false, values will be rewritten */ private static function populate_all_themes($use_cache = true) { if (is_null(self::$current_themes) || $use_cache) { self::$current_themes = wp_get_themes(); } if (is_null(self::$inactive_themes) || !$use_cache) { $current_theme = wp_get_theme()->get_stylesheet(); self::$inactive_themes = self::$current_themes; unset(self::$inactive_themes[$current_theme]); } }