tribe transformer: added properties
This commit is contained in:
parent
4e2c1fb23a
commit
e15f93689b
1 changed files with 13 additions and 1 deletions
|
@ -97,16 +97,28 @@ final class The_Events_Calendar extends Event {
|
|||
* Check if the comments are enabled for the current event.
|
||||
*/
|
||||
public function get_comments_enabled(): bool {
|
||||
return ( 'open' === $this->tribe_event->comment_status ) ? true : false;
|
||||
return 'open' === $this->tribe_event->comment_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the event is an online event.
|
||||
*/
|
||||
public function get_is_online(): bool {
|
||||
if ( class_exists( 'Tribe\Events\Virtual\Event_Meta' ) &&
|
||||
$this->tribe_event->virtual_event_type &&
|
||||
Tribe\Events\Virtual\Event_Meta::$value_virtual_event_type === $this->tribe_event->virtual_event_type) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns language of the event
|
||||
*/
|
||||
public function get_in_language(): string {
|
||||
return $this->get_locale();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content for the ActivityPub Item with
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue