| | |
| | | if (is_post_type_archive($registered)) { |
| | | $this->params = ['all']; |
| | | } elseif (is_tax($taxonomies)) { |
| | | $this->params = []; |
| | | $this->params = ['tax']; |
| | | } else { |
| | | $this->params = []; |
| | | } |
| | |
| | | |
| | | protected function getCurrentPostTypes():array |
| | | { |
| | | if (is_post_type_archive()) { |
| | | if (is_post_type_archive() && !is_tax()) { |
| | | return [get_queried_object()->name]; |
| | | } |
| | | if (is_singular()) { |
| | | return [get_queried_object()->post_type]; |
| | | } |
| | | if (is_tax()) { |
| | | $tax = get_queried_object(); |
| | | jvbDump($tax, 'taxonomy'); |
| | | return [get_post_type()]; |
| | | } |
| | | return []; |
| | | } |
| | |
| | | if (is_singular()) { |
| | | return $this->formatSingular(); |
| | | } |
| | | |
| | | |
| | | $items = new WP_Query($this->buildArgs($past)); |
| | | |
| | | $events = implode('', array_map([$this, 'formatItem'], $items->posts)); |