From bcb88eb06fcc4a2f1c0d9f63155cce4cd9a03792 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 27 Sep 2023 11:08:55 +0200 Subject: [PATCH] add moderators as attributed_to (#473) --- includes/model/class-blog-user.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/model/class-blog-user.php b/includes/model/class-blog-user.php index 3853da1..317eaab 100644 --- a/includes/model/class-blog-user.php +++ b/includes/model/class-blog-user.php @@ -219,6 +219,14 @@ class Blog_User extends User { 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() { if ( 'Group' === $this->get_type() ) { return true;