move dummy functino to event-base transformer class

This commit is contained in:
André Menrath 2024-06-30 14:27:54 +02:00
parent 735926745b
commit 9eebf588ab
2 changed files with 12 additions and 12 deletions

View file

@ -8,10 +8,22 @@
namespace Activitypub_Event_Extensions\Activitypub\Transformer; namespace Activitypub_Event_Extensions\Activitypub\Transformer;
use Activitypub\Model\Blog;
use Activitypub\Transformer\Post; use Activitypub\Transformer\Post;
/** /**
* Base transformer for WordPress event post types to ActivityPub events. * Base transformer for WordPress event post types to ActivityPub events.
*/ */
class Event extends Post { 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();
}
} }

View file

@ -163,18 +163,6 @@ class VS_Event extends Event_Transformer {
return 'MEETING'; 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. * Create a custom summary.
* *