| | |
| | | // Run query |
| | | $query = new WP_Query($args); |
| | | |
| | | $registrar = Registrar::getInstance(str_replace('-', '_', $this->post_type)); |
| | | $this->fields = $registrar->getFields()??[]; |
| | | |
| | | $this->fields = Registrar::getFieldsFor(str_replace('-', '_', $this->post_type)); |
| | | $this->taxonomies = $this->getTaxonomies($this->post_type); |
| | | $posts = array_map([$this, 'prepareItem'], $query->posts); |
| | | |
| | |
| | | $get = []; |
| | | $fields = (empty($fields)) ? $this->fields : $fields; |
| | | $get = $this->getUploadFields($fields); |
| | | |
| | | error_log('Upload fields: '.print_r($get, true)); |
| | | |
| | | if (!empty($get)) { |
| | | $actualGet = array_map(function($fieldName) { |