From 1b3e772d004c6809b6c38c0895cce30d2b237279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Thu, 21 Nov 2024 16:33:06 +0100 Subject: [PATCH] make getter for time public --- includes/activitypub/transformer/class-gatherpress.php | 4 ++-- includes/activitypub/transformer/class-vs-event-list.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/activitypub/transformer/class-gatherpress.php b/includes/activitypub/transformer/class-gatherpress.php index 756524a..f670c1f 100644 --- a/includes/activitypub/transformer/class-gatherpress.php +++ b/includes/activitypub/transformer/class-gatherpress.php @@ -73,14 +73,14 @@ final class GatherPress extends Event { /** * Get the end time from the event object. */ - protected function get_end_time(): ?string { + public 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 { + public 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-vs-event-list.php b/includes/activitypub/transformer/class-vs-event-list.php index c476404..15370f5 100644 --- a/includes/activitypub/transformer/class-vs-event-list.php +++ b/includes/activitypub/transformer/class-vs-event-list.php @@ -44,7 +44,7 @@ final class VS_Event_List extends Event_Transformer { /** * Get the end time from the events metadata. */ - protected function get_end_time(): ?string { + public function get_end_time(): ?string { if ( 'yes' === get_post_meta( $this->wp_object->ID, 'event-hide-end-time', true ) ) { return null; } @@ -58,7 +58,7 @@ final class VS_Event_List extends Event_Transformer { /** * Get the end time from the events metadata. */ - protected function get_start_time(): string { + public function get_start_time(): string { $start_time = get_post_meta( $this->wp_object->ID, 'event-start-date', true ); return \gmdate( 'Y-m-d\TH:i:s\Z', $start_time ); }