Skip to content

Commit

Permalink
Merge branch 'TMS-1024' into stage
Browse files Browse the repository at this point in the history
  • Loading branch information
eebbi committed Apr 10, 2024
2 parents 0a6029c + 4c9f0eb commit 243cd89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/PostType/ManualEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ protected function get_event_tab( string $key ) : ?Field\Tab {
* @return array
*/
public static function normalize_event( $event ) { // phpcs:disable Generic.Metrics.CyclomaticComplexity
$event_is_virtual = $event->is_virtual_event ?? false;
$normalized_event = [
'name' => $event->title ?? '',
'short_description' => $event->short_description ?? '',
Expand All @@ -520,11 +521,12 @@ public static function normalize_event( $event ) { // phpcs:disable Generic.Metr
'end_date_raw' => static::get_as_datetime( $event->end_datetime ),
'image' => $event->image ?? '',
'url' => $event->url ?? '',
'is_virtual_event' => $event->is_virtualevent ?? false,
'is_virtual_event' => $event_is_virtual,
'virtual_event_link' => $event->virtual_event_link ?? '',
'date_title' => __( 'Dates', 'tms-theme-base' ),
'time_title' => __( 'Time', 'tms-theme-base' ),
'location_title' => __( 'Location', 'tms-theme-base' ),
'location_icon' => $event_is_virtual ? 'globe' : 'location',
'price_title' => __( 'Price', 'tms-theme-base' ),
'provider_title' => __( 'Organizer', 'tms-theme-base' ),
'recurring' => ! empty( $event->dates ) ? count( $event->dates ) > 1 : null,
Expand Down

0 comments on commit 243cd89

Please sign in to comment.