| | |
| | | */ |
| | | public function addTaxonomyFilter(array $taxonomies, ?string $limit = null): self { |
| | | foreach($taxonomies as $taxonomy) { |
| | | error_log('Fetchinig taxonomy: '.print_r($taxonomy, true)); |
| | | $registrar = Registrar::getInstance($taxonomy); |
| | | $this->taxonomies[$taxonomy] = [ |
| | | 'type' => 'taxonomy', |
| | | 'taxonomy'=> $taxonomy, |
| | | 'limit' => $limit, |
| | | 'label' => $registrar->getPlural(), |
| | | 'icon' => $registrar->getIcon() |
| | | ]; |
| | | |
| | | if ($registrar) { |
| | | $this->taxonomies[$taxonomy] = [ |
| | | 'type' => 'taxonomy', |
| | | 'taxonomy'=> $taxonomy, |
| | | 'limit' => $limit, |
| | | 'label' => $registrar->getPlural(), |
| | | 'icon' => $registrar->getIcon() |
| | | ]; |
| | | } |
| | | } |
| | | |
| | | return $this; |
| | |
| | | <option value="<?=$control?>"<?=$disabled?>><?=$label?></option> |
| | | <?php |
| | | } |
| | | foreach ($this->taxonomies as $taxonomy) { |
| | | |
| | | foreach ($this->taxonomies as $taxonomy =>$config) { |
| | | $registrar = Registrar::getInstance($taxonomy); |
| | | if (!$registrar) continue; |
| | | ?> |
| | |
| | | $section = (array_key_exists('section', $config)) ? $config['section'] : 'basic'; |
| | | $tabs[$section]['content'] .= Form::render($n, '', $config); |
| | | } else { |
| | | jvbDump($config, $n); |
| | | echo Form::render($n, '', $config); |
| | | } |
| | | } |