PluginProbe
Friends / 4.3.2
Friends v4.3.2
4.3.2 4.3.1 4.3.0 4.2.2 4.2.1 4.2.0 4.1.0 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.0 2.9.1 All 88 releases
← All changes | includes/class-user-feed.php +24 -1 4.2.24.3.2 View file →
@@ -129,9 +129,32 @@
129 129 return array( new Subscription( $term ) );
130 130 }
131 131 }
132 132
133 - return array();
133 + // Feeds of a user-backed friend aren't child terms of a subscription
134 + // term but are attached to the user as object terms, see
135 + // User::save_feeds().
136 + $object_ids = get_objects_in_term( $this->term->term_id, self::TAXONOMY );
137 + if ( is_wp_error( $object_ids ) ) {
138 + return array();
139 + }
140 +
141 + $users = array();
142 + foreach ( $object_ids as $object_id ) {
143 + $user = User::get_user_by_id( $object_id );
144 + if ( ! $user ) {
145 + continue;
146 + }
147 +
148 + // The same object id can belong to an ap_actor post, so only accept
149 + // the user if this feed really is one of theirs.
150 + $feeds = $user->get_feeds();
151 + if ( isset( $feeds[ $this->term->term_id ] ) ) {
152 + $users[] = $user;
153 + }
154 + }
155 +
156 + return $users;
134 157 }
135 158
136 159 /**
137 160 * Whether the feed is active (=subscribed).