diff --git a/includes/activitypub/transformer/class-event.php b/includes/activitypub/transformer/class-event.php index 7b144a6..a2e1056 100644 --- a/includes/activitypub/transformer/class-event.php +++ b/includes/activitypub/transformer/class-event.php @@ -301,6 +301,17 @@ abstract class Event extends Post { return $summary; } + /** + * By default set the timezone of the WordPress site. + * + * This is likely to be overwritten by the actual transformer. + * + * @return string The timezone string of the site. + */ + public function get_timezone(): string { + return wp_timezone_string(); + } + /** * Remove the permalink shortcode from a WordPress template. * diff --git a/includes/activitypub/transformer/class-the-events-calendar.php b/includes/activitypub/transformer/class-the-events-calendar.php index 0e78522..b83cd40 100644 --- a/includes/activitypub/transformer/class-the-events-calendar.php +++ b/includes/activitypub/transformer/class-the-events-calendar.php @@ -94,7 +94,7 @@ final class The_Events_Calendar extends Event { * * @return string status of the event */ - public function get_tribe_status() { + public function get_status() { if ( 'canceled' === $this->tribe_event->event_status ) { return 'CANCELLED'; } @@ -179,4 +179,13 @@ final class The_Events_Calendar extends Event { return $location; } + + /** + * Get the timezone of the event. + * + * @return string The timezone string of the site. + */ + public function get_timezone(): string { + return $this->tribe_event->timezone; + } }