| | |
| | | if (Features::forContent($post_type)->has('is_calendar')) { |
| | | $args = $this->applyCalendarFilters($args, $params); |
| | | } |
| | | $taxonomies = array_filter($params, function($param) { |
| | | return str_starts_with($param, 'tax_'); |
| | | }, ARRAY_FILTER_USE_KEY); |
| | | if (!empty($taxonomies)) { |
| | | $params['taxonomies'] = []; |
| | | foreach ($taxonomies as $taxonomy => $terms) { |
| | | $taxonomy = str_replace('tax_', '', $taxonomy); |
| | | $params['taxonomies'][$taxonomy] = $terms; |
| | | } |
| | | } |
| | | if (array_key_exists('taxonomies', $params)) { |
| | | $args = $this->applyTaxonomyFilters($args, $params); |
| | | } |
| | |
| | | return $images; |
| | | } |
| | | |
| | | protected function formatTimeline(WP_Post $post):array |
| | | public function formatTimeline(WP_Post $post):array |
| | | { |
| | | $item = $this->prepareItem($post, true, false); |
| | | //Step 1: Get the fields that apply to all posts |