From e7bc9706a8d3dbe39ac99a8caaac368ce77b359f Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Mon, 19 Jun 2023 11:36:59 +0200 Subject: [PATCH] remove url attribute --- includes/collection/class-followers.php | 2 +- includes/model/class-follower.php | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/includes/collection/class-followers.php b/includes/collection/class-followers.php index b7cbbd7..49569e5 100644 --- a/includes/collection/class-followers.php +++ b/includes/collection/class-followers.php @@ -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, diff --git a/includes/model/class-follower.php b/includes/model/class-follower.php index 0a6a6ef..660bec5 100644 --- a/includes/model/class-follower.php +++ b/includes/model/class-follower.php @@ -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 *