Refactoring #19

Merged
linos merged 6 commits from refactoring into main 2024-07-05 13:29:14 +02:00
2 changed files with 12 additions and 12 deletions
Showing only changes of commit 9eebf588ab - Show all commits

View file

@ -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();
}
}

View file

@ -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.
*