File tree Expand file tree Collapse file tree 4 files changed +10
-14
lines changed Expand file tree Collapse file tree 4 files changed +10
-14
lines changed Original file line number Diff line number Diff line change
1
+ Significance: patch
2
+ Type: changed
3
+
4
+ Add default avatars for actors without icons in admin tables
Original file line number Diff line number Diff line change @@ -231,14 +231,12 @@ public function prepare_items() {
231
231
continue ;
232
232
}
233
233
234
- $ url = object_to_uri ( $ actor ->get_url () ?? $ actor ->get_id () );
235
-
236
234
$ this ->items [] = array (
237
235
'id ' => $ blocked_actor_post ->ID ,
238
- 'icon ' => object_to_uri ( $ actor ->get_icon () ?? ' ' ),
236
+ 'icon ' => object_to_uri ( $ actor ->get_icon () ?? ACTIVITYPUB_PLUGIN_URL . ' assets/img/mp.jpg ' ),
239
237
'post_title ' => $ actor ->get_name () ?? $ actor ->get_preferred_username (),
240
238
'username ' => $ actor ->get_preferred_username (),
241
- 'url ' => $ url ,
239
+ 'url ' => object_to_uri ( $ actor -> get_url () ?? $ actor -> get_id () ) ,
242
240
'webfinger ' => $ this ->get_webfinger ( $ actor ),
243
241
'identifier ' => $ actor ->get_id (),
244
242
'modified ' => $ blocked_actor_post ->post_modified_gmt ,
Original file line number Diff line number Diff line change @@ -275,19 +275,16 @@ public function prepare_items() {
275
275
276
276
foreach ( $ followers as $ follower ) {
277
277
$ actor = Actors::get_actor ( $ follower );
278
-
279
278
if ( \is_wp_error ( $ actor ) ) {
280
279
continue ;
281
280
}
282
281
283
- $ url = object_to_uri ( $ actor ->get_url () ?? $ actor ->get_id () );
284
-
285
282
$ this ->items [] = array (
286
283
'id ' => $ follower ->ID ,
287
- 'icon ' => object_to_uri ( $ actor ->get_icon () ?? ' ' ),
284
+ 'icon ' => object_to_uri ( $ actor ->get_icon () ?? ACTIVITYPUB_PLUGIN_URL . ' assets/img/mp.jpg ' ),
288
285
'post_title ' => $ actor ->get_name () ?? $ actor ->get_preferred_username (),
289
286
'username ' => $ actor ->get_preferred_username (),
290
- 'url ' => $ url ,
287
+ 'url ' => object_to_uri ( $ actor -> get_url () ?? $ actor -> get_id () ) ,
291
288
'webfinger ' => $ this ->get_webfinger ( $ actor ),
292
289
'identifier ' => $ actor ->get_id (),
293
290
'modified ' => $ follower ->post_modified_gmt ,
Original file line number Diff line number Diff line change @@ -256,19 +256,16 @@ public function prepare_items() {
256
256
257
257
foreach ( $ followings as $ following ) {
258
258
$ actor = Actors::get_actor ( $ following );
259
-
260
259
if ( \is_wp_error ( $ actor ) ) {
261
260
continue ;
262
261
}
263
262
264
- $ url = object_to_uri ( $ actor ->get_url () ?? $ actor ->get_id () );
265
-
266
263
$ this ->items [] = array (
267
264
'id ' => $ following ->ID ,
268
- 'icon ' => object_to_uri ( $ actor ->get_icon () ?? ' ' ),
265
+ 'icon ' => object_to_uri ( $ actor ->get_icon () ?? ACTIVITYPUB_PLUGIN_URL . ' assets/img/mp.jpg ' ),
269
266
'post_title ' => $ actor ->get_name () ?? $ actor ->get_preferred_username (),
270
267
'username ' => $ actor ->get_preferred_username (),
271
- 'url ' => $ url ,
268
+ 'url ' => object_to_uri ( $ actor -> get_url () ?? $ actor -> get_id () ) ,
272
269
'webfinger ' => $ this ->get_webfinger ( $ actor ),
273
270
'status ' => Following_Collection::check_status ( $ this ->user_id , $ following ->ID ),
274
271
'identifier ' => $ actor ->get_id (),
You can’t perform that action at this time.
0 commit comments