File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change
1
+ Significance: minor
2
+ Type: added
3
+
4
+ Author profiles will cap the amount of extra fields they return to 20, to avoid response size errors in clients.
Original file line number Diff line number Diff line change @@ -39,6 +39,17 @@ public static function get_actor_fields( $user_id ) {
39
39
$ args ['author ' ] = $ user_id ;
40
40
}
41
41
42
+ // Limit to 20 fields to prevent response size issues.
43
+ if ( ! is_admin () ) {
44
+ /**
45
+ * Filters the number of extra fields to retrieve for an ActivityPub actor.
46
+ *
47
+ * @param int $limit The number of extra fields to retrieve. Default 20.
48
+ */
49
+ $ args ['posts_per_page ' ] = apply_filters ( 'activitypub_actor_extra_fields_limit ' , 20 );
50
+ $ args ['nopaging ' ] = false ;
51
+ }
52
+
42
53
$ query = new \WP_Query ( $ args );
43
54
$ fields = $ query ->posts ?? array ();
44
55
You can’t perform that action at this time.
0 commit comments