| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | use FluentBooking\App\Models\Calendar; |
| 8 | 8 | use FluentBooking\App\Models\CalendarSlot; |
| 9 | 9 | use FluentBooking\App\Services\CalendarEventService; |
| 10 | 10 | use FluentBooking\App\Services\Helper; |
| 11 | +use FluentBooking\App\Services\LocationService; | |
| 11 | 12 | use FluentBooking\Framework\Support\Arr; |
| 12 | 13 | |
| 13 | 14 | class BlockEditorHandler |
| 14 | 15 | { |
| @@ -50,9 +51,9 @@ | ||
| 50 | 51 | 'color_schema' => $event->color_schema, |
| 51 | 52 | 'durations' => $event->getAvailableDurations(), |
| 52 | 53 | 'locations' => $event->defaultLocationHtml(), |
| 53 | 54 | 'payment_html' => $event->getPaymentHtml(), |
| 54 | - 'loc_settings' => $event->location_settings, | |
| 55 | + 'loc_settings' => LocationService::sanitizePublicLocationSettings($event->location_settings), | |
| 55 | 56 | 'description' => $event->short_description |
| 56 | 57 | ]; |
| 57 | 58 | } |
| 58 | 59 | |
| @@ -59,9 +60,9 @@ | ||
| 59 | 60 | $formattedCalendars[$calendar->id] = [ |
| 60 | 61 | 'id' => (string)$calendar->id, |
| 61 | 62 | 'title' => $calendar->title, |
| 62 | 63 | 'description' => wpautop(Helper::excerpt($calendar->description, 200)), |
| 63 | - 'author' => $calendar->getAuthorProfile(), | |
| 64 | + 'author' => Arr::only($calendar->getAuthorProfile(), ['name', 'avatar']), | |
| 64 | 65 | 'event_order' => $calendar->getMeta('event_order'), |
| 65 | 66 | 'events' => $formattedEvents |
| 66 | 67 | ]; |
| 67 | 68 | } |