Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
c8eedafb13 | |||
1153bce8e2 | |||
4ff31c6b45 | |||
d7c4f5ae39 |
2 changed files with 24 additions and 2 deletions
|
@ -276,6 +276,16 @@ abstract class Event extends Post {
|
||||||
return $template;
|
return $template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 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();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic function that converts an WP-Event object to an ActivityPub-Event object.
|
* Generic function that converts an WP-Event object to an ActivityPub-Event object.
|
||||||
*
|
*
|
||||||
|
|
|
@ -65,7 +65,7 @@ final class The_Events_Calendar extends Event {
|
||||||
$tags[] = $tag;
|
$tags[] = $tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$tags[] = parent::get_tag();
|
$tags = array_merge( $tags, parent::get_tag() );
|
||||||
|
|
||||||
return $tags;
|
return $tags;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ final class The_Events_Calendar extends Event {
|
||||||
*
|
*
|
||||||
* @return string status of the event
|
* @return string status of the event
|
||||||
*/
|
*/
|
||||||
public function get_tribe_status() {
|
public function get_status() {
|
||||||
if ( 'canceled' === $this->tribe_event->event_status ) {
|
if ( 'canceled' === $this->tribe_event->event_status ) {
|
||||||
return 'CANCELLED';
|
return 'CANCELLED';
|
||||||
}
|
}
|
||||||
|
@ -193,10 +193,22 @@ final class The_Events_Calendar extends Event {
|
||||||
}
|
}
|
||||||
$location->set_id( $venue->permalink );
|
$location->set_id( $venue->permalink );
|
||||||
$location->set_name( $venue->post_title );
|
$location->set_name( $venue->post_title );
|
||||||
|
$location->set_sensitive( null );
|
||||||
|
|
||||||
return $location;
|
return $location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 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 $this->tribe_event->timezone;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the default event transformers to_object function.
|
* Extend the default event transformers to_object function.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue