set timezone and status for tribe
This commit is contained in:
parent
a6938edf46
commit
e4f195cf62
2 changed files with 21 additions and 1 deletions
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue