remove url attribute

This commit is contained in:
Matthias Pfefferle 2023-06-19 11:36:59 +02:00
parent bbf40a5fec
commit e7bc9706a8
2 changed files with 1 additions and 21 deletions

View file

@ -50,7 +50,7 @@ class Followers {
'name' => _x( 'Followers', 'post_type plural name', 'activitypub' ),
'singular_name' => _x( 'Follower', 'post_type single name', 'activitypub' ),
),
'public' => true,
'public' => false,
'hierarchical' => false,
'rewrite' => false,
'query_var' => false,

View file

@ -53,11 +53,6 @@ class Follower {
*/
private $avatar;
/**
* The URL to the Follower
*/
private $url;
/**
* The URL to the Followers Inbox
*
@ -120,7 +115,6 @@ class Follower {
'name' => 'name',
'preferredUsername' => 'username',
'inbox' => 'inbox',
'url' => 'url',
);
/**
@ -247,20 +241,6 @@ class Follower {
return null;
}
/**
* Get a URL for the follower. Creates one out of the actor if no URL was set.
*/
public function get_url() {
if ( $this->get( 'url' ) ) {
return $this->get( 'url' );
}
$actor = $this->get_actor();
// normalize
$actor = ltrim( $actor, '@' );
$parts = explode( '@', $actor );
return sprintf( 'https://%s/@%s', $parts[1], $parts[0] );
}
/**
* Set new Error
*