If the Blog is in "single user" mode, return "Person" insted of "Group".
This commit is contained in:
parent
befd0d4f1e
commit
57bc4214b7
1 changed files with 16 additions and 0 deletions
|
@ -5,6 +5,7 @@ use WP_Query;
|
|||
use Activitypub\Signature;
|
||||
use Activitypub\Collection\Users;
|
||||
|
||||
use function Activitypub\is_single_user;
|
||||
use function Activitypub\is_user_disabled;
|
||||
|
||||
class Blog_User extends User {
|
||||
|
@ -206,4 +207,19 @@ class Blog_User extends User {
|
|||
public function get_canonical_url() {
|
||||
return \home_url();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the type of the object.
|
||||
*
|
||||
* If the Blog is in "single user" mode, return "Person" insted of "Group".
|
||||
*
|
||||
* @return string The type of the object.
|
||||
*/
|
||||
public function get_type() {
|
||||
if ( is_single_user() ) {
|
||||
return 'Person';
|
||||
} else {
|
||||
return $this->type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue