From 92fff2220dc559f9e8abd088a2da22b4183393dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Mon, 18 Nov 2024 17:36:27 +0100 Subject: [PATCH] wip --- .../transformer/class-eventprime.php | 61 +++++++++++++++++ .../transformer/class-gatherpress.php | 2 +- includes/class-setup.php | 1 + includes/plugins/class-eventprime.php | 65 +++++++++++++++++++ 4 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 includes/activitypub/transformer/class-eventprime.php create mode 100644 includes/plugins/class-eventprime.php diff --git a/includes/activitypub/transformer/class-eventprime.php b/includes/activitypub/transformer/class-eventprime.php new file mode 100644 index 0000000..05546ee --- /dev/null +++ b/includes/activitypub/transformer/class-eventprime.php @@ -0,0 +1,61 @@ +gp_event = new GatherPress_Event( $this->wp_object->ID ); + $this->gp_venue = $this->gp_event->get_venue_information(); + } + + /** + * Get the end time from the event object. + */ + protected function get_end_time(): ?string { + return $this->gp_event->get_datetime_end( 'Y-m-d\TH:i:s\Z' ); + } + + /** + * Get the end time from the event object. + */ + protected function get_start_time(): string { + return $this->gp_event->get_datetime_start( 'Y-m-d\TH:i:s\Z' ); + } +} diff --git a/includes/activitypub/transformer/class-gatherpress.php b/includes/activitypub/transformer/class-gatherpress.php index 756524a..ea742b3 100644 --- a/includes/activitypub/transformer/class-gatherpress.php +++ b/includes/activitypub/transformer/class-gatherpress.php @@ -1,6 +1,6 @@