2023-11-19 19:56:03 +01:00
|
|
|
<?php
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit; // Exit if accessed directly.
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ActivityPub Tribe Transformer
|
|
|
|
*
|
|
|
|
* @since 1.0.0
|
|
|
|
*/
|
2023-11-22 14:59:51 +01:00
|
|
|
class Tribe extends \Activitypub\Transformer\Base {
|
2023-11-19 19:56:03 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get widget name.
|
|
|
|
*
|
|
|
|
* Retrieve oEmbed widget name.
|
|
|
|
*
|
|
|
|
* @since 1.0.0
|
|
|
|
* @access public
|
|
|
|
* @return string Widget name.
|
|
|
|
*/
|
|
|
|
public function get_name() {
|
2023-11-25 12:05:12 +01:00
|
|
|
return 'activitypub-event-transformers/tribe';
|
2023-11-19 19:56:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get widget title.
|
|
|
|
*
|
|
|
|
* Retrieve Transformer title.
|
|
|
|
*
|
|
|
|
* @since 1.0.0
|
|
|
|
* @access public
|
|
|
|
* @return string Widget title.
|
|
|
|
*/
|
|
|
|
public function get_label() {
|
|
|
|
return 'The Events Calendar';
|
|
|
|
}
|
|
|
|
|
2023-11-20 18:06:20 +01:00
|
|
|
/**
|
|
|
|
* Returns the ActivityStreams 2.0 Object-Type for an Event.
|
|
|
|
*
|
|
|
|
* @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event
|
|
|
|
*
|
|
|
|
* @return string The Event Object-Type.
|
|
|
|
*/
|
|
|
|
protected function get_object_type() {
|
|
|
|
return 'Event';
|
|
|
|
}
|
2023-11-22 14:59:51 +01:00
|
|
|
|
2023-11-19 19:56:03 +01:00
|
|
|
/**
|
|
|
|
* Get supported post types.
|
|
|
|
*
|
|
|
|
* Retrieve the list of supported WordPress post types this transformer widget can handle.
|
|
|
|
*
|
|
|
|
* @since 1.0.0
|
|
|
|
* @access public
|
|
|
|
* @return array Widget categories.
|
|
|
|
*/
|
|
|
|
public function get_supported_post_types() {
|
|
|
|
return [ 'tribe_events' ];
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|