private function unsetInvalidThemes() { foreach ($this->allowed as $index => $item) { if (!in_array($item, FlamingParrot_Theme::getVariants())) { unset($this->allowed[$index]); } } $this->allowed = array_values($this->allowed); }