From 9eebf588ab840fdff9172d0c46d6f3f57ed6cd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sun, 30 Jun 2024 14:27:54 +0200 Subject: [PATCH] move dummy functino to event-base transformer class --- includes/activitypub/transformer/class-event.php | 12 ++++++++++++ includes/activitypub/transformer/class-vs-event.php | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/activitypub/transformer/class-event.php b/includes/activitypub/transformer/class-event.php index 6fb3938..7a3aca6 100644 --- a/includes/activitypub/transformer/class-event.php +++ b/includes/activitypub/transformer/class-event.php @@ -8,10 +8,22 @@ namespace Activitypub_Event_Extensions\Activitypub\Transformer; +use Activitypub\Model\Blog; use Activitypub\Transformer\Post; /** * Base transformer for WordPress event post types to ActivityPub events. */ class Event extends Post { + /** + * Returns the User-URL of the Author of the Post. + * + * If `single_user` mode is enabled, the URL of the Blog-User is returned. + * + * @return string The User-URL. + */ + protected function get_attributed_to() { + $blog = new Blog(); + return $blog->get_id(); + } } diff --git a/includes/activitypub/transformer/class-vs-event.php b/includes/activitypub/transformer/class-vs-event.php index 5e01d27..a48e596 100644 --- a/includes/activitypub/transformer/class-vs-event.php +++ b/includes/activitypub/transformer/class-vs-event.php @@ -163,18 +163,6 @@ class VS_Event extends Event_Transformer { return 'MEETING'; } - /** - * Returns the User-URL of the Author of the Post. - * - * If `single_user` mode is enabled, the URL of the Blog-User is returned. - * - * @return string The User-URL. - */ - protected function get_attributed_to() { - $user = new Blog(); - return $user->get_url(); - } - /** * Create a custom summary. *