private function delete_theme($drop_files) { ThemesManager::uninstall($this->theme_id, $drop_files); }
public function update_themes() { $active_themes_number = 0; foreach (ThemesManager::get_installed_themes_map() as $id => $theme) { if ($theme->get_configuration()->get_compatibility() == self::NEW_KERNEL_VERSION) { $active_themes_number++; } else { ThemesManager::uninstall($id); $this->add_information_to_file('theme ' . $id, 'has been uninstalled because : incompatible with new version'); } } if (empty($active_themes_number)) { ThemesManager::install('base'); $user_accounts_config = UserAccountsConfig::load(); $user_accounts_config->set_default_theme('base'); UserAccountsConfig::save(); } }