|
46 | 46 | * for a given user or group. Our filter on `bp_core_avatar_folder_dir()` prevents this happening, |
47 | 47 | * and our filter on `bp_core_fetch_avatar_no_grav` will make the code flow to this |
48 | 48 | * bp_core_default_avatar_* filter. |
49 | | - * |
| 49 | + * |
50 | 50 | * It's normally used to override the fallback image for Gravatar, but by duplicating some logic, we |
51 | 51 | * use it to here to set a custom URL to support VIP Go FHS without any core changes to BuddyPress. |
52 | 52 | * |
@@ -81,7 +81,7 @@ function vipbp_filter_user_avatar_urls( $_, $params ) { |
81 | 81 | * for a given user or group. Our filter on `bp_core_avatar_folder_dir()` prevents this happening, |
82 | 82 | * and our filter on `bp_core_fetch_avatar_no_grav` will make the code flow to this |
83 | 83 | * bp_core_default_avatar_* filter. |
84 | | - * |
| 84 | + * |
85 | 85 | * It's normally used to override the fallback image for Gravatar, but by duplicating some logic, we |
86 | 86 | * use it to here to set a custom URL to support VIP Go FHS without any core changes to BuddyPress. |
87 | 87 | * |
@@ -323,7 +323,7 @@ function vipbp_handle_avatar_upload( $_, $file, $upload_dir_filter ) { |
323 | 323 | // Upload file. |
324 | 324 | $uploaded_file = $file['file']; |
325 | 325 | $result = wp_handle_upload( $uploaded_file, array( |
326 | | - 'action' => '', |
| 326 | + 'action' => 'wp_handle_upload', // Matches Core's action for uploads, to ensure VIP Go fileservice filters are applied |
327 | 327 | 'test_form' => false, |
328 | 328 | ) ); |
329 | 329 |
|
@@ -491,7 +491,7 @@ function vip_handle_cover_image_upload( $_, $args, $needs_reset, $object_data ) |
491 | 491 | // Upload file. |
492 | 492 | $uploaded_file = $_FILES['file']; |
493 | 493 | $result = wp_handle_upload( $uploaded_file, array( |
494 | | - 'action' => '', |
| 494 | + 'action' => 'wp_handle_upload', // Matches Core's action for uploads, to ensure VIP Go fileservice filters are applied |
495 | 495 | 'test_form' => false, |
496 | 496 | ) ); |
497 | 497 |
|
@@ -592,7 +592,7 @@ function vipbp_handle_avatar_crop( $_, $args ) { |
592 | 592 | } elseif ( $args['object'] === 'group' ) { |
593 | 593 | $meta = groups_get_groupmeta( (int) $args['item_id'], 'vipbp-' . $args['avatar_dir'], true ); |
594 | 594 | $meta = wp_parse_args( $cropping_meta, $meta ); |
595 | | - groups_update_groupmeta( (int) $args['item_id'], 'vipbp-' . $args['avatar_dir'], $meta ); |
| 595 | + groups_update_groupmeta( (int) $args['item_id'], 'vipbp-' . $args['avatar_dir'], $meta ); |
596 | 596 | } |
597 | 597 |
|
598 | 598 | if ( $switched ) { |
@@ -676,7 +676,7 @@ function vipbp_delete_existing_avatar( $_, $args ) { |
676 | 676 |
|
677 | 677 | } elseif ( $args['object'] === 'group' ) { |
678 | 678 | $meta = groups_get_groupmeta( (int) $args['item_id'], 'vipbp-' . $args['avatar_dir'], true ); |
679 | | - groups_delete_groupmeta( (int) $args['item_id'], 'vipbp-' . $args['avatar_dir'] ); |
| 679 | + groups_delete_groupmeta( (int) $args['item_id'], 'vipbp-' . $args['avatar_dir'] ); |
680 | 680 | } |
681 | 681 |
|
682 | 682 | if ( $meta ) { |
|
0 commit comments