function system_theme_action() { $declared_themes = theme::list_of_declared_themes(); foreach ($declared_themes as $theme) { if ($theme->action != null) { theme::update_action($theme->theme_name); switch ($theme->action) { case "setdefault": theme::action_set_default($theme->theme_name); break; case "disable": theme::action_disable_theme($theme->theme_name); break; case "enable": theme::action_enable_theme($theme->theme_name); break; } } } }
public static function theme_action($theme, $action) { theme::update_action($theme, $action); page::redirect("/admin/themes"); }