| | |
| | | 'dateFrom' => 'string', |
| | | 'dateTo' => 'string', |
| | | 'context' => 'string', |
| | | 'source' => 'string', |
| | | 'contextId' => 'string', |
| | | 'favourites' => 'boolean', |
| | | 'user' => 'integer', |
| | | 'highlight' => 'string', |
| | |
| | | 'dateFrom' => 'string', |
| | | 'dateTo' => 'string', |
| | | 'context' => 'string', |
| | | 'source' => 'string', |
| | | 'contextId' => 'string', |
| | | 'favourites' => 'boolean', |
| | | 'user' => 'integer', |
| | | 'highlight' => 'string', |
| | |
| | | break; |
| | | case 'post': |
| | | $out['date'] = $post->post_date; |
| | | $out['modified'] = $post->post_modified; |
| | | $out['date_modified'] = $post->post_modified; |
| | | $out['user_id'] = (int)$post->post_author; |
| | | $out['url'] = get_the_permalink($postID); |
| | | $out['title']= get_the_title($postID); |
| | |
| | | $args = $this->applyContextFilters( |
| | | $args, |
| | | [ |
| | | 'id' => $data['source']??'0', |
| | | 'id' => $data['contextId']??'0', |
| | | 'type' => $data['context'] |
| | | ] |
| | | ); |
| | |
| | | |
| | | // Add term to tax query |
| | | $args['tax_query'][] = [ |
| | | 'taxonomy' => jvbCheckBase($context['type']), |
| | | 'field' => 'term_id', |
| | | 'taxonomy' => $registrar->getBased(), |
| | | // 'field' => 'term_id', |
| | | 'terms' => [(int)$context['id']], |
| | | ]; |
| | | break; |
| | | case $registrar->getType() === 'term': |
| | | // Add term to tax query |
| | | $args['tax_query'][] = [ |
| | | 'taxonomy' => $registrar->getBased(), |
| | | // 'field' => 'term_id', |
| | | 'terms' => [(int)$context['id']], |
| | | ]; |
| | | break; |