| | |
| | | // Check field definitions for taxonomy or post relations |
| | | if (isset($this->fieldDefinitions[$relation])) { |
| | | $fieldDef = $this->fieldDefinitions[$relation]; |
| | | $value = $this->meta->getValue($relation); |
| | | $value = $this->meta->get($relation); |
| | | |
| | | if (!$value) { |
| | | return null; |
| | |
| | | // Image URL accessors for different sizes |
| | | if (str_ends_with($variable, '_image_url')) { |
| | | $field = str_replace('_image_url', '', $variable); |
| | | $imageId = $this->meta?->getValue($field); |
| | | $imageId = $this->meta?->get($field); |
| | | if ($imageId) { |
| | | return wp_get_attachment_image_url($imageId, 'full') ?: ''; |
| | | } |
| | |
| | | */ |
| | | private function resolveLocationComponent(string $component): string |
| | | { |
| | | $location = $this->meta?->getValue('location'); |
| | | $location = $this->meta?->get('location'); |
| | | |
| | | if (!is_array($location)) { |
| | | return ''; |