wordpress-activitypub/includes/base/class-transformer-base.php

44 lines
1.1 KiB
PHP
Raw Normal View History

2023-11-18 13:40:27 +01:00
<?php
/**
* Inspired by the PHP ActivityPub Library by @Landrok
*
* @link https://github.com/landrok/activitypub
*/
namespace Activitypub\Activity;
use WP_Error;
use ReflectionClass;
use function Activitypub\camel_to_snake_case;
use function Activitypub\snake_to_camel_case;
/**
* Base class to implement WordPress to ActivityPub transformers.
*/
abstract class Transformer_Base {
/**
* Get the supported WP post_types that the transformer can use as an input.
*
* By default all post types are supported.
*
* @since version_number_transformer_management_placeholder
*/
public function get_supported_post_types() {
return \get_post_types( array(), 'names');
}
/**
* Get the name used for registering the transformer with the ActivityPub plugin.
*
* @since version_number_transformer_management_placeholder
*/
abstract public function get_name();
/**
* Get the display name for the ActivityPub transformer.
*
* @since version_number_transformer_management_placeholder
*/
abstract public function get_title();
}