Add options for summary #80

Merged
linos merged 15 commits from custom_summary into main 2024-12-06 18:27:08 +01:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 1b3e772d00 - Show all commits

View file

@ -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' );
}

View file

@ -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 );
}