Refactoring #19
2 changed files with 12 additions and 12 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue