From ebc8bd4b37b92d43a94e36429063d417757714ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Wed, 28 Aug 2024 21:15:26 +0200 Subject: [PATCH] small fixes --- includes/activitypub/transformer/class-event.php | 5 ++--- includes/activitypub/transformer/class-vs-event-list.php | 2 +- includes/class-setup.php | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/includes/activitypub/transformer/class-event.php b/includes/activitypub/transformer/class-event.php index ae1d9d6..c7b508f 100644 --- a/includes/activitypub/transformer/class-event.php +++ b/includes/activitypub/transformer/class-event.php @@ -36,9 +36,8 @@ class Event extends Post { * * @return string The User-URL. */ - protected function get_attributed_to() { - $blog = new Blog(); - return $blog->get_id(); + protected function get_actor() { + return $this->get_attributed_to(); } /** diff --git a/includes/activitypub/transformer/class-vs-event-list.php b/includes/activitypub/transformer/class-vs-event-list.php index 9ab1769..3b1be6f 100644 --- a/includes/activitypub/transformer/class-vs-event-list.php +++ b/includes/activitypub/transformer/class-vs-event-list.php @@ -243,7 +243,7 @@ class VS_Event_List extends Event_Transformer { ->set_name( get_the_title( $this->wp_object->ID ) ) ->set_is_online( false ) ->set_in_language( $this->get_locale() ) - ->set_actor( get_rest_url_by_path( 'application' ) ) + ->set_actor() ->set_to( array( 'https://www.w3.org/ns/activitystreams#Public' ) ) ->set_location() ->set_id(); diff --git a/includes/class-setup.php b/includes/class-setup.php index 4189545..d62b396 100644 --- a/includes/class-setup.php +++ b/includes/class-setup.php @@ -52,7 +52,7 @@ class Setup { 'plugin_file' => 'very-simple-event-list/vsel.php', 'post_type' => 'event', 'settings_page_id' => 'settings_page_vsel', - 'transformer_class' => 'VS_Event', + 'transformer_class' => 'VS_Event_List', 'taxonomy' => 'event_cat', ), );