add moderators as attributed_to (#473)

This commit is contained in:
Matthias Pfefferle 2023-09-27 11:08:55 +02:00 committed by GitHub
parent 444c4b2837
commit bcb88eb06f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,6 +219,14 @@ class Blog_User extends User {
return get_rest_url_by_path( 'collections/moderators' ); return get_rest_url_by_path( 'collections/moderators' );
} }
public function get_attributed_to() {
if ( is_single_user() || 'Group' !== $this->get_type() ) {
return null;
}
return get_rest_url_by_path( 'collections/moderators' );
}
public function get_posting_restricted_to_mods() { public function get_posting_restricted_to_mods() {
if ( 'Group' === $this->get_type() ) { if ( 'Group' === $this->get_type() ) {
return true; return true;