BuddyPress - Version 7.2.1

Version Description

See: https://codex.buddypress.org/releases/version-7-2-1/

Download this release

Release Info

Developer imath
Plugin Icon 128x128 BuddyPress
Version 7.2.1
Comparing to
See all releases

Code changes from version 7.2.0 to 7.2.1

Files changed (26) hide show
  1. bp-activity/classes/class-bp-rest-activity-endpoint.php +95 -113
  2. bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php +14 -7
  3. bp-blogs/classes/class-bp-rest-blogs-endpoint.php +25 -25
  4. bp-core/classes/class-bp-admin-types.php +4 -0
  5. bp-core/classes/class-bp-rest-components-endpoint.php +13 -13
  6. bp-friends/classes/class-bp-rest-friends-endpoint.php +41 -35
  7. bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php +35 -36
  8. bp-groups/classes/class-bp-rest-attachments-group-cover-endpoint.php +42 -36
  9. bp-groups/classes/class-bp-rest-group-invites-endpoint.php +210 -166
  10. bp-groups/classes/class-bp-rest-group-membership-endpoint.php +159 -146
  11. bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php +68 -71
  12. bp-groups/classes/class-bp-rest-groups-endpoint.php +66 -80
  13. bp-loader.php +1 -1
  14. bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php +49 -45
  15. bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php +41 -35
  16. bp-members/classes/class-bp-rest-members-endpoint.php +65 -49
  17. bp-members/classes/class-bp-rest-signup-endpoint.php +53 -67
  18. bp-messages/classes/class-bp-rest-messages-endpoint.php +89 -86
  19. bp-notifications/classes/class-bp-rest-notifications-endpoint.php +46 -50
  20. bp-templates/bp-nouveau/includes/groups/functions.php +57 -1
  21. bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php +56 -56
  22. bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php +20 -21
  23. bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php +39 -49
  24. buddypress.pot +534 -525
  25. class-buddypress.php +1 -1
  26. readme.txt +8 -2
bp-activity/classes/class-bp-rest-activity-endpoint.php CHANGED
@@ -261,7 +261,7 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
261
  * @since 5.0.0
262
  *
263
  * @param WP_REST_Request $request Full data about the request.
264
- * @return bool|WP_Error
265
  */
266
  public function get_items_permissions_check( $request ) {
267
 
@@ -270,7 +270,7 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
270
  *
271
  * @since 5.0.0
272
  *
273
- * @param bool|WP_Error $retval Returned value.
274
  * @param WP_REST_Request $request The request sent to the API.
275
  */
276
  return apply_filters( 'bp_rest_activity_get_items_permissions_check', true, $request );
@@ -325,19 +325,19 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
325
  * @since 5.0.0
326
  *
327
  * @param WP_REST_Request $request Full data about the request.
328
- * @return bool|WP_Error
329
  */
330
  public function get_item_permissions_check( $request ) {
331
- $retval = true;
 
 
 
 
 
 
332
 
333
- if ( ! $this->can_see( $request ) ) {
334
- $retval = new WP_Error(
335
- 'bp_rest_authorization_required',
336
- __( 'Sorry, you cannot view the activities.', 'buddypress' ),
337
- array(
338
- 'status' => rest_authorization_required_code(),
339
- )
340
- );
341
  }
342
 
343
  /**
@@ -345,7 +345,7 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
345
  *
346
  * @since 5.0.0
347
  *
348
- * @param bool|WP_Error $retval Returned value.
349
  * @param WP_REST_Request $request The request sent to the API.
350
  */
351
  return apply_filters( 'bp_rest_activity_get_item_permissions_check', $retval, $request );
@@ -467,33 +467,34 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
467
  * @since 5.0.0
468
  *
469
  * @param WP_REST_Request $request Full details about the request.
470
- * @return bool|WP_Error
471
  */
472
  public function create_item_permissions_check( $request ) {
473
- $retval = true;
 
 
 
 
 
 
474
 
475
- if ( ! is_user_logged_in() ) {
476
- $retval = new WP_Error(
477
- 'bp_rest_authorization_required',
478
- __( 'Sorry, you are not allowed to create activities.', 'buddypress' ),
479
- array(
480
- 'status' => rest_authorization_required_code(),
481
- )
482
- );
483
- }
484
 
485
- $item_id = $request->get_param( 'primary_item_id' );
486
- $component = $request->get_param( 'component' );
487
 
488
- if ( true === $retval && bp_is_active( 'groups' ) && buddypress()->groups->id === $component && ! is_null( $item_id ) ) {
489
- if ( ! $this->show_hidden( $component, $item_id ) ) {
490
- $retval = new WP_Error(
491
- 'bp_rest_authorization_required',
492
- __( 'Sorry, you are not allowed to create activities.', 'buddypress' ),
493
- array(
494
- 'status' => rest_authorization_required_code(),
495
- )
496
- );
 
 
 
497
  }
498
  }
499
 
@@ -502,7 +503,7 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
502
  *
503
  * @since 5.0.0
504
  *
505
- * @param bool|WP_Error $retval Returned value.
506
  * @param WP_REST_Request $request The request sent to the API.
507
  */
508
  return apply_filters( 'bp_rest_activity_create_item_permissions_check', $retval, $request );
@@ -576,41 +577,31 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
576
  * @since 5.0.0
577
  *
578
  * @param WP_REST_Request $request Full details about the request.
579
- * @return bool|WP_Error
580
  */
581
  public function update_item_permissions_check( $request ) {
582
- $retval = true;
583
-
584
- if ( ! is_user_logged_in() ) {
585
- $retval = new WP_Error(
586
- 'bp_rest_authorization_required',
587
- __( 'Sorry, you are not allowed to update this activity.', 'buddypress' ),
588
- array(
589
- 'status' => rest_authorization_required_code(),
590
- )
591
- );
592
- }
593
-
594
- $activity = $this->get_activity_object( $request );
595
 
596
- if ( true === $retval && empty( $activity->id ) ) {
597
- $retval = new WP_Error(
598
- 'bp_rest_invalid_id',
599
- __( 'Invalid activity ID.', 'buddypress' ),
600
- array(
601
- 'status' => 404,
602
- )
603
- );
604
- }
605
 
606
- if ( true === $retval && ! bp_activity_user_can_delete( $activity ) ) {
607
- $retval = new WP_Error(
608
- 'bp_rest_authorization_required',
609
- __( 'Sorry, you are not allowed to update this activity.', 'buddypress' ),
610
- array(
611
- 'status' => rest_authorization_required_code(),
612
- )
613
- );
 
 
 
614
  }
615
 
616
  /**
@@ -618,7 +609,7 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
618
  *
619
  * @since 5.0.0
620
  *
621
- * @param bool|WP_Error $retval Returned value.
622
  * @param WP_REST_Request $request The request sent to the API.
623
  */
624
  return apply_filters( 'bp_rest_activity_update_item_permissions_check', $retval, $request );
@@ -689,41 +680,31 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
689
  * @since 5.0.0
690
  *
691
  * @param WP_REST_Request $request Full details about the request.
692
- * @return bool|WP_Error
693
  */
694
  public function delete_item_permissions_check( $request ) {
695
- $retval = true;
696
-
697
- if ( ! is_user_logged_in() ) {
698
- $retval = new WP_Error(
699
- 'bp_rest_authorization_required',
700
- __( 'Sorry, you are not allowed to delete this activity.', 'buddypress' ),
701
- array(
702
- 'status' => rest_authorization_required_code(),
703
- )
704
- );
705
- }
706
 
707
- $activity = $this->get_activity_object( $request );
 
708
 
709
- if ( true === $retval && empty( $activity->id ) ) {
710
- $retval = new WP_Error(
711
- 'bp_rest_invalid_id',
712
- __( 'Invalid activity ID.', 'buddypress' ),
713
- array(
714
- 'status' => 404,
715
- )
716
- );
717
- }
718
-
719
- if ( true === $retval && ! bp_activity_user_can_delete( $activity ) ) {
720
- $retval = new WP_Error(
721
- 'bp_rest_authorization_required',
722
- __( 'Sorry, you are not allowed to delete this activity.', 'buddypress' ),
723
- array(
724
- 'status' => rest_authorization_required_code(),
725
- )
726
- );
727
  }
728
 
729
  /**
@@ -731,7 +712,7 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
731
  *
732
  * @since 5.0.0
733
  *
734
- * @param bool|WP_Error $retval Returned value.
735
  * @param WP_REST_Request $request The request sent to the API.
736
  */
737
  return apply_filters( 'bp_rest_activity_delete_item_permissions_check', $retval, $request );
@@ -835,19 +816,19 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
835
  * @since 5.0.0
836
  *
837
  * @param WP_REST_Request $request Full details about the request.
838
- * @return bool|WP_Error
839
  */
840
  public function update_favorite_permissions_check( $request ) {
841
- $retval = true;
 
 
 
 
 
 
842
 
843
- if ( ! ( is_user_logged_in() && bp_activity_can_favorite() ) ) {
844
- $retval = new WP_Error(
845
- 'bp_rest_authorization_required',
846
- __( 'Sorry, you are not allowed to update favorites.', 'buddypress' ),
847
- array(
848
- 'status' => rest_authorization_required_code(),
849
- )
850
- );
851
  }
852
 
853
  /**
@@ -855,7 +836,7 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
855
  *
856
  * @since 5.0.0
857
  *
858
- * @param bool|WP_Error $retval Returned value.
859
  * @param WP_REST_Request $request The request sent to the API.
860
  */
861
  return apply_filters( 'bp_rest_activity_update_favorite_permissions_check', $retval, $request );
@@ -1042,8 +1023,8 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
1042
  }
1043
 
1044
  // Activity author ID.
1045
- if ( ! empty( $schema['properties']['user_id'] ) && isset( $request['user_id'] ) ) {
1046
- $prepared_activity->user_id = (int) $request['user_id'];
1047
  } else {
1048
  $prepared_activity->user_id = get_current_user_id();
1049
  }
@@ -1305,6 +1286,7 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
1305
  'user_id' => array(
1306
  'context' => array( 'view', 'edit' ),
1307
  'description' => __( 'The ID for the author of the activity.', 'buddypress' ),
 
1308
  'type' => 'integer',
1309
  ),
1310
  'link' => array(
261
  * @since 5.0.0
262
  *
263
  * @param WP_REST_Request $request Full data about the request.
264
+ * @return true|WP_Error
265
  */
266
  public function get_items_permissions_check( $request ) {
267
 
270
  *
271
  * @since 5.0.0
272
  *
273
+ * @param true|WP_Error $retval Returned value.
274
  * @param WP_REST_Request $request The request sent to the API.
275
  */
276
  return apply_filters( 'bp_rest_activity_get_items_permissions_check', true, $request );
325
  * @since 5.0.0
326
  *
327
  * @param WP_REST_Request $request Full data about the request.
328
+ * @return true|WP_Error
329
  */
330
  public function get_item_permissions_check( $request ) {
331
+ $retval = new WP_Error(
332
+ 'bp_rest_authorization_required',
333
+ __( 'Sorry, you cannot view the activities.', 'buddypress' ),
334
+ array(
335
+ 'status' => rest_authorization_required_code(),
336
+ )
337
+ );
338
 
339
+ if ( $this->can_see( $request ) ) {
340
+ $retval = true;
 
 
 
 
 
 
341
  }
342
 
343
  /**
345
  *
346
  * @since 5.0.0
347
  *
348
+ * @param true|WP_Error $retval Returned value.
349
  * @param WP_REST_Request $request The request sent to the API.
350
  */
351
  return apply_filters( 'bp_rest_activity_get_item_permissions_check', $retval, $request );
467
  * @since 5.0.0
468
  *
469
  * @param WP_REST_Request $request Full details about the request.
470
+ * @return true|WP_Error
471
  */
472
  public function create_item_permissions_check( $request ) {
473
+ $error = new WP_Error(
474
+ 'bp_rest_authorization_required',
475
+ __( 'Sorry, you are not allowed to create activities.', 'buddypress' ),
476
+ array(
477
+ 'status' => rest_authorization_required_code(),
478
+ )
479
+ );
480
 
481
+ $retval = $error;
 
 
 
 
 
 
 
 
482
 
483
+ if ( is_user_logged_in() ) {
484
+ $user_id = $request->get_param( 'user_id' );
485
 
486
+ if ( empty( $user_id ) || (int) bp_loggedin_user_id() === (int) $user_id ) {
487
+ $item_id = $request->get_param( 'primary_item_id' );
488
+ $component = $request->get_param( 'component' );
489
+
490
+ // The current user can create an activity.
491
+ $retval = true;
492
+
493
+ if ( bp_is_active( 'groups' ) && buddypress()->groups->id === $component && ! is_null( $item_id ) ) {
494
+ if ( ! $this->show_hidden( $component, $item_id ) ) {
495
+ $retval = $error;
496
+ }
497
+ }
498
  }
499
  }
500
 
503
  *
504
  * @since 5.0.0
505
  *
506
+ * @param true|WP_Error $retval Returned value.
507
  * @param WP_REST_Request $request The request sent to the API.
508
  */
509
  return apply_filters( 'bp_rest_activity_create_item_permissions_check', $retval, $request );
577
  * @since 5.0.0
578
  *
579
  * @param WP_REST_Request $request Full details about the request.
580
+ * @return true|WP_Error
581
  */
582
  public function update_item_permissions_check( $request ) {
583
+ $retval = new WP_Error(
584
+ 'bp_rest_authorization_required',
585
+ __( 'Sorry, you are not allowed to update this activity.', 'buddypress' ),
586
+ array(
587
+ 'status' => rest_authorization_required_code(),
588
+ )
589
+ );
 
 
 
 
 
 
590
 
591
+ if ( is_user_logged_in() ) {
592
+ $activity = $this->get_activity_object( $request );
 
 
 
 
 
 
 
593
 
594
+ if ( empty( $activity->id ) ) {
595
+ $retval = new WP_Error(
596
+ 'bp_rest_invalid_id',
597
+ __( 'Invalid activity ID.', 'buddypress' ),
598
+ array(
599
+ 'status' => 404,
600
+ )
601
+ );
602
+ } elseif ( bp_activity_user_can_delete( $activity ) ) {
603
+ $retval = true;
604
+ }
605
  }
606
 
607
  /**
609
  *
610
  * @since 5.0.0
611
  *
612
+ * @param true|WP_Error $retval Returned value.
613
  * @param WP_REST_Request $request The request sent to the API.
614
  */
615
  return apply_filters( 'bp_rest_activity_update_item_permissions_check', $retval, $request );
680
  * @since 5.0.0
681
  *
682
  * @param WP_REST_Request $request Full details about the request.
683
+ * @return true|WP_Error
684
  */
685
  public function delete_item_permissions_check( $request ) {
686
+ $retval = new WP_Error(
687
+ 'bp_rest_authorization_required',
688
+ __( 'Sorry, you are not allowed to delete this activity.', 'buddypress' ),
689
+ array(
690
+ 'status' => rest_authorization_required_code(),
691
+ )
692
+ );
 
 
 
 
693
 
694
+ if ( is_user_logged_in() ) {
695
+ $activity = $this->get_activity_object( $request );
696
 
697
+ if ( empty( $activity->id ) ) {
698
+ $retval = new WP_Error(
699
+ 'bp_rest_invalid_id',
700
+ __( 'Invalid activity ID.', 'buddypress' ),
701
+ array(
702
+ 'status' => 404,
703
+ )
704
+ );
705
+ } elseif ( bp_activity_user_can_delete( $activity ) ) {
706
+ $retval = true;
707
+ }
 
 
 
 
 
 
 
708
  }
709
 
710
  /**
712
  *
713
  * @since 5.0.0
714
  *
715
+ * @param true|WP_Error $retval Returned value.
716
  * @param WP_REST_Request $request The request sent to the API.
717
  */
718
  return apply_filters( 'bp_rest_activity_delete_item_permissions_check', $retval, $request );
816
  * @since 5.0.0
817
  *
818
  * @param WP_REST_Request $request Full details about the request.
819
+ * @return true|WP_Error
820
  */
821
  public function update_favorite_permissions_check( $request ) {
822
+ $retval = new WP_Error(
823
+ 'bp_rest_authorization_required',
824
+ __( 'Sorry, you are not allowed to update favorites.', 'buddypress' ),
825
+ array(
826
+ 'status' => rest_authorization_required_code(),
827
+ )
828
+ );
829
 
830
+ if ( is_user_logged_in() && bp_activity_can_favorite() ) {
831
+ $retval = true;
 
 
 
 
 
 
832
  }
833
 
834
  /**
836
  *
837
  * @since 5.0.0
838
  *
839
+ * @param true|WP_Error $retval Returned value.
840
  * @param WP_REST_Request $request The request sent to the API.
841
  */
842
  return apply_filters( 'bp_rest_activity_update_favorite_permissions_check', $retval, $request );
1023
  }
1024
 
1025
  // Activity author ID.
1026
+ if ( ! empty( $activity->user_id ) ) {
1027
+ $prepared_activity->user_id = (int) $activity->user_id;
1028
  } else {
1029
  $prepared_activity->user_id = get_current_user_id();
1030
  }
1286
  'user_id' => array(
1287
  'context' => array( 'view', 'edit' ),
1288
  'description' => __( 'The ID for the author of the activity.', 'buddypress' ),
1289
+ 'readonly' => true,
1290
  'type' => 'integer',
1291
  ),
1292
  'link' => array(
bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php CHANGED
@@ -161,13 +161,20 @@ class BP_REST_Attachments_Blog_Avatar_Endpoint extends WP_REST_Controller {
161
  * @since 6.0.0
162
  *
163
  * @param WP_REST_Request $request Full details about the request.
164
- * @return bool|WP_Error
165
  */
166
  public function get_item_permissions_check( $request ) {
167
- $retval = true;
 
 
 
 
 
 
 
168
  $this->blog = $this->blogs_endpoint->get_blog_object( $request['id'] );
169
 
170
- if ( true === $retval && ! is_object( $this->blog ) ) {
171
  $retval = new WP_Error(
172
  'bp_rest_blog_invalid_id',
173
  __( 'Invalid group ID.', 'buddypress' ),
@@ -175,9 +182,9 @@ class BP_REST_Attachments_Blog_Avatar_Endpoint extends WP_REST_Controller {
175
  'status' => 404,
176
  )
177
  );
178
- }
179
-
180
- if ( true === $retval && ! buddypress()->avatar->show_avatars ) {
181
  $retval = new WP_Error(
182
  'bp_rest_attachments_blog_avatar_disabled',
183
  __( 'Sorry, blog avatar is disabled.', 'buddypress' ),
@@ -192,7 +199,7 @@ class BP_REST_Attachments_Blog_Avatar_Endpoint extends WP_REST_Controller {
192
  *
193
  * @since 6.0.0
194
  *
195
- * @param bool|WP_Error $retval Returned value.
196
  * @param WP_REST_Request $request The request sent to the API.
197
  */
198
  return apply_filters( 'bp_rest_attachments_blog_avatar_get_item_permissions_check', $retval, $request );
161
  * @since 6.0.0
162
  *
163
  * @param WP_REST_Request $request Full details about the request.
164
+ * @return true|WP_Error
165
  */
166
  public function get_item_permissions_check( $request ) {
167
+ $retval = new WP_Error(
168
+ 'bp_rest_authorization_required',
169
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
170
+ array(
171
+ 'status' => rest_authorization_required_code(),
172
+ )
173
+ );
174
+
175
  $this->blog = $this->blogs_endpoint->get_blog_object( $request['id'] );
176
 
177
+ if ( ! is_object( $this->blog ) ) {
178
  $retval = new WP_Error(
179
  'bp_rest_blog_invalid_id',
180
  __( 'Invalid group ID.', 'buddypress' ),
182
  'status' => 404,
183
  )
184
  );
185
+ } elseif ( buddypress()->avatar->show_avatars ) {
186
+ $retval = true;
187
+ } else {
188
  $retval = new WP_Error(
189
  'bp_rest_attachments_blog_avatar_disabled',
190
  __( 'Sorry, blog avatar is disabled.', 'buddypress' ),
199
  *
200
  * @since 6.0.0
201
  *
202
+ * @param true|WP_Error $retval Returned value.
203
  * @param WP_REST_Request $request The request sent to the API.
204
  */
205
  return apply_filters( 'bp_rest_attachments_blog_avatar_get_item_permissions_check', $retval, $request );
bp-blogs/classes/class-bp-rest-blogs-endpoint.php CHANGED
@@ -163,7 +163,7 @@ class BP_REST_Blogs_Endpoint extends WP_REST_Controller {
163
  * @since 6.0.0
164
  *
165
  * @param WP_REST_Request $request Full data about the request.
166
- * @return WP_Error|bool
167
  */
168
  public function get_items_permissions_check( $request ) {
169
 
@@ -172,7 +172,7 @@ class BP_REST_Blogs_Endpoint extends WP_REST_Controller {
172
  *
173
  * @since 6.0.0
174
  *
175
- * @param bool|WP_Error $retval Returned value.
176
  * @param WP_REST_Request $request The request sent to the API.
177
  */
178
  return apply_filters( 'bp_rest_blogs_get_items_permissions_check', true, $request );
@@ -227,7 +227,7 @@ class BP_REST_Blogs_Endpoint extends WP_REST_Controller {
227
  * @since 6.0.0
228
  *
229
  * @param WP_REST_Request $request Full details about the request.
230
- * @return WP_Error|bool
231
  */
232
  public function get_item_permissions_check( $request ) {
233
 
@@ -236,7 +236,7 @@ class BP_REST_Blogs_Endpoint extends WP_REST_Controller {
236
  *
237
  * @since 6.0.0
238
  *
239
- * @param bool|WP_Error $retval Returned value.
240
  * @param WP_REST_Request $request The request sent to the API.
241
  */
242
  return apply_filters( 'bp_rest_blogs_get_item_permissions_check', true, $request );
@@ -357,29 +357,29 @@ class BP_REST_Blogs_Endpoint extends WP_REST_Controller {
357
  * @since 7.0.0
358
  *
359
  * @param WP_REST_Request $request Full details about the request.
360
- * @return WP_Error|bool
361
  */
362
  public function create_item_permissions_check( $request ) {
363
- $retval = true;
364
-
365
- if ( ! is_user_logged_in() ) {
366
- $retval = new WP_Error(
367
- 'bp_rest_authorization_required',
368
- __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
369
- array(
370
- 'status' => rest_authorization_required_code(),
371
- )
372
- );
373
- }
374
 
375
- if ( true === $retval && false === bp_blog_signup_enabled() ) {
376
- $retval = new WP_Error(
377
- 'bp_rest_blogs_signup_disabled',
378
- __( 'Sorry, blog creation is disabled.', 'buddypress' ),
379
- array(
380
- 'status' => 500,
381
- )
382
- );
 
 
 
 
383
  }
384
 
385
  /**
@@ -387,7 +387,7 @@ class BP_REST_Blogs_Endpoint extends WP_REST_Controller {
387
  *
388
  * @since 7.0.0
389
  *
390
- * @param bool|WP_Error $retval Returned value.
391
  * @param WP_REST_Request $request The request sent to the API.
392
  */
393
  return apply_filters( 'bp_rest_blogs_create_item_permissions_check', $retval, $request );
163
  * @since 6.0.0
164
  *
165
  * @param WP_REST_Request $request Full data about the request.
166
+ * @return true|WP_Error
167
  */
168
  public function get_items_permissions_check( $request ) {
169
 
172
  *
173
  * @since 6.0.0
174
  *
175
+ * @param true|WP_Error $retval Returned value.
176
  * @param WP_REST_Request $request The request sent to the API.
177
  */
178
  return apply_filters( 'bp_rest_blogs_get_items_permissions_check', true, $request );
227
  * @since 6.0.0
228
  *
229
  * @param WP_REST_Request $request Full details about the request.
230
+ * @return true|WP_Error
231
  */
232
  public function get_item_permissions_check( $request ) {
233
 
236
  *
237
  * @since 6.0.0
238
  *
239
+ * @param true|WP_Error $retval Returned value.
240
  * @param WP_REST_Request $request The request sent to the API.
241
  */
242
  return apply_filters( 'bp_rest_blogs_get_item_permissions_check', true, $request );
357
  * @since 7.0.0
358
  *
359
  * @param WP_REST_Request $request Full details about the request.
360
+ * @return true|WP_Error
361
  */
362
  public function create_item_permissions_check( $request ) {
363
+ $retval = new WP_Error(
364
+ 'bp_rest_authorization_required',
365
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
366
+ array(
367
+ 'status' => rest_authorization_required_code(),
368
+ )
369
+ );
 
 
 
 
370
 
371
+ if ( is_user_logged_in() ) {
372
+ if ( true === bp_blog_signup_enabled() ) {
373
+ $retval = true;
374
+ } else {
375
+ $retval = new WP_Error(
376
+ 'bp_rest_blogs_signup_disabled',
377
+ __( 'Sorry, blog creation is disabled.', 'buddypress' ),
378
+ array(
379
+ 'status' => 500,
380
+ )
381
+ );
382
+ }
383
  }
384
 
385
  /**
387
  *
388
  * @since 7.0.0
389
  *
390
+ * @param true|WP_Error $retval Returned value.
391
  * @param WP_REST_Request $request The request sent to the API.
392
  */
393
  return apply_filters( 'bp_rest_blogs_create_item_permissions_check', $retval, $request );
bp-core/classes/class-bp-admin-types.php CHANGED
@@ -147,6 +147,10 @@ class BP_Admin_Types {
147
  private function handle_action( $action ) {
148
  $referer = wp_get_referer();
149
 
 
 
 
 
150
  // Adding a new type into the database.
151
  if ( 'add-tag' === $action ) {
152
  check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
147
  private function handle_action( $action ) {
148
  $referer = wp_get_referer();
149
 
150
+ if ( ! bp_current_user_can( 'bp_moderate' ) ) {
151
+ return;
152
+ }
153
+
154
  // Adding a new type into the database.
155
  if ( 'add-tag' === $action ) {
156
  check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
bp-core/classes/class-bp-rest-components-endpoint.php CHANGED
@@ -156,19 +156,19 @@ class BP_REST_Components_Endpoint extends WP_REST_Controller {
156
  * @since 5.0.0
157
  *
158
  * @param WP_REST_Request $request Full data about the request.
159
- * @return bool|WP_Error
160
  */
161
  public function get_items_permissions_check( $request ) {
162
- $retval = true;
 
 
 
 
 
 
163
 
164
- if ( ! ( is_user_logged_in() && bp_current_user_can( 'bp_moderate' ) ) ) {
165
- $retval = new WP_Error(
166
- 'bp_rest_authorization_required',
167
- __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
168
- array(
169
- 'status' => rest_authorization_required_code(),
170
- )
171
- );
172
  }
173
 
174
  /**
@@ -176,7 +176,7 @@ class BP_REST_Components_Endpoint extends WP_REST_Controller {
176
  *
177
  * @since 5.0.0
178
  *
179
- * @param bool|WP_Error $retval Returned value.
180
  * @param WP_REST_Request $request The request sent to the API.
181
  */
182
  return apply_filters( 'bp_rest_components_get_items_permissions_check', $retval, $request );
@@ -267,7 +267,7 @@ class BP_REST_Components_Endpoint extends WP_REST_Controller {
267
  * @since 5.0.0
268
  *
269
  * @param WP_REST_Request $request Full details about the request.
270
- * @return bool|WP_Error
271
  */
272
  public function update_item_permissions_check( $request ) {
273
  $retval = $this->get_items_permissions_check( $request );
@@ -277,7 +277,7 @@ class BP_REST_Components_Endpoint extends WP_REST_Controller {
277
  *
278
  * @since 5.0.0
279
  *
280
- * @param bool|WP_Error $retval Returned value.
281
  * @param WP_REST_Request $request The request sent to the API.
282
  */
283
  return apply_filters( 'bp_rest_components_update_item_permissions_check', $retval, $request );
156
  * @since 5.0.0
157
  *
158
  * @param WP_REST_Request $request Full data about the request.
159
+ * @return true|WP_Error
160
  */
161
  public function get_items_permissions_check( $request ) {
162
+ $retval = new WP_Error(
163
+ 'bp_rest_authorization_required',
164
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
165
+ array(
166
+ 'status' => rest_authorization_required_code(),
167
+ )
168
+ );
169
 
170
+ if ( bp_current_user_can( 'manage_options' ) ) {
171
+ $retval = true;
 
 
 
 
 
 
172
  }
173
 
174
  /**
176
  *
177
  * @since 5.0.0
178
  *
179
+ * @param true|WP_Error $retval Returned value.
180
  * @param WP_REST_Request $request The request sent to the API.
181
  */
182
  return apply_filters( 'bp_rest_components_get_items_permissions_check', $retval, $request );
267
  * @since 5.0.0
268
  *
269
  * @param WP_REST_Request $request Full details about the request.
270
+ * @return true|WP_Error
271
  */
272
  public function update_item_permissions_check( $request ) {
273
  $retval = $this->get_items_permissions_check( $request );
277
  *
278
  * @since 5.0.0
279
  *
280
+ * @param true|WP_Error $retval Returned value.
281
  * @param WP_REST_Request $request The request sent to the API.
282
  */
283
  return apply_filters( 'bp_rest_components_update_item_permissions_check', $retval, $request );
bp-friends/classes/class-bp-rest-friends-endpoint.php CHANGED
@@ -169,19 +169,19 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
169
  * @since 6.0.0
170
  *
171
  * @param WP_REST_Request $request Full data about the request.
172
- * @return WP_Error|bool
173
  */
174
  public function get_items_permissions_check( $request ) {
175
- $retval = true;
 
 
 
 
 
 
176
 
177
- if ( ! is_user_logged_in() ) {
178
- $retval = new WP_Error(
179
- 'bp_rest_authorization_required',
180
- __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
181
- array(
182
- 'status' => rest_authorization_required_code(),
183
- )
184
- );
185
  }
186
 
187
  /**
@@ -189,7 +189,7 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
189
  *
190
  * @since 6.0.0
191
  *
192
- * @param bool|WP_Error $retval Returned value.
193
  * @param WP_REST_Request $request The request sent to the API.
194
  */
195
  return apply_filters( 'bp_rest_friends_get_items_permissions_check', $retval, $request );
@@ -260,19 +260,19 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
260
  * @since 6.0.0
261
  *
262
  * @param WP_REST_Request $request Full data about the request.
263
- * @return WP_Error|bool
264
  */
265
  public function get_item_permissions_check( $request ) {
266
- $retval = true;
 
 
 
 
 
 
267
 
268
- if ( ! is_user_logged_in() ) {
269
- $retval = new WP_Error(
270
- 'bp_rest_authorization_required',
271
- __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
272
- array(
273
- 'status' => rest_authorization_required_code(),
274
- )
275
- );
276
  }
277
 
278
  /**
@@ -280,7 +280,7 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
280
  *
281
  * @since 6.0.0
282
  *
283
- * @param bool|WP_Error $retval Returned value.
284
  * @param WP_REST_Request $request The request sent to the API.
285
  */
286
  return apply_filters( 'bp_rest_friends_get_item_permissions_check', $retval, $request );
@@ -320,10 +320,19 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
320
  );
321
  }
322
 
323
- $is_moderator = bp_current_user_can( 'bp_moderate' );
 
324
 
325
- // Only admins can create friendship requests for other people.
326
- if ( ! in_array( bp_loggedin_user_id(), [ $initiator_id->ID, $friend_id->ID ], true ) && ! $is_moderator ) {
 
 
 
 
 
 
 
 
327
  return new WP_Error(
328
  'bp_rest_friends_create_item_failed',
329
  __( 'You are not allowed to perform this action.', 'buddypress' ),
@@ -334,10 +343,7 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
334
  }
335
 
336
  // Only admins can force a friendship request.
337
- $force = false;
338
- if ( true === $request->get_param( 'force' ) && $is_moderator ) {
339
- $force = true;
340
- }
341
 
342
  // Adding friendship.
343
  if ( ! friends_add_friend( $initiator_id->ID, $friend_id->ID, $force ) ) {
@@ -393,7 +399,7 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
393
  * @since 6.0.0
394
  *
395
  * @param WP_REST_Request $request Full details about the request.
396
- * @return WP_Error|bool
397
  */
398
  public function create_item_permissions_check( $request ) {
399
  $retval = $this->get_item_permissions_check( $request );
@@ -403,7 +409,7 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
403
  *
404
  * @since 6.0.0
405
  *
406
- * @param bool|WP_Error $retval Returned value.
407
  * @param WP_REST_Request $request The request sent to the API.
408
  */
409
  return apply_filters( 'bp_rest_friends_create_item_permissions_check', $retval, $request );
@@ -488,7 +494,7 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
488
  * @since 6.0.0
489
  *
490
  * @param WP_REST_Request $request Full details about the request.
491
- * @return WP_Error|bool
492
  */
493
  public function update_item_permissions_check( $request ) {
494
  $retval = $this->get_item_permissions_check( $request );
@@ -498,7 +504,7 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
498
  *
499
  * @since 6.0.0
500
  *
501
- * @param bool|WP_Error $retval Returned value.
502
  * @param WP_REST_Request $request The request sent to the API.
503
  */
504
  return apply_filters( 'bp_rest_friends_update_item_permissions_check', $retval, $request );
@@ -604,7 +610,7 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
604
  * @since 6.0.0
605
  *
606
  * @param WP_REST_Request $request Full details about the request.
607
- * @return WP_Error|bool
608
  */
609
  public function delete_item_permissions_check( $request ) {
610
  $retval = $this->get_item_permissions_check( $request );
@@ -614,7 +620,7 @@ class BP_REST_Friends_Endpoint extends WP_REST_Controller {
614
  *
615
  * @since 6.0.0
616
  *
617
- * @param bool|WP_Error $retval Returned value.
618
  * @param WP_REST_Request $request The request sent to the API.
619
  */
620
  return apply_filters( 'bp_rest_friends_delete_item_permissions_check', $retval, $request );
169
  * @since 6.0.0
170
  *
171
  * @param WP_REST_Request $request Full data about the request.
172
+ * @return true|WP_Error
173
  */
174
  public function get_items_permissions_check( $request ) {
175
+ $retval = new WP_Error(
176
+ 'bp_rest_authorization_required',
177
+ __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
178
+ array(
179
+ 'status' => rest_authorization_required_code(),
180
+ )
181
+ );
182
 
183
+ if ( is_user_logged_in() ) {
184
+ $retval = true;
 
 
 
 
 
 
185
  }
186
 
187
  /**
189
  *
190
  * @since 6.0.0
191
  *
192
+ * @param true|WP_Error $retval Returned value.
193
  * @param WP_REST_Request $request The request sent to the API.
194
  */
195
  return apply_filters( 'bp_rest_friends_get_items_permissions_check', $retval, $request );
260
  * @since 6.0.0
261
  *
262
  * @param WP_REST_Request $request Full data about the request.
263
+ * @return true|WP_Error
264
  */
265
  public function get_item_permissions_check( $request ) {
266
+ $retval = new WP_Error(
267
+ 'bp_rest_authorization_required',
268
+ __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
269
+ array(
270
+ 'status' => rest_authorization_required_code(),
271
+ )
272
+ );
273
 
274
+ if ( is_user_logged_in() ) {
275
+ $retval = true;
 
 
 
 
 
 
276
  }
277
 
278
  /**
280
  *
281
  * @since 6.0.0
282
  *
283
+ * @param true|WP_Error $retval Returned value.
284
  * @param WP_REST_Request $request The request sent to the API.
285
  */
286
  return apply_filters( 'bp_rest_friends_get_item_permissions_check', $retval, $request );
320
  );
321
  }
322
 
323
+ $is_moderator = bp_current_user_can( 'bp_moderate' );
324
+ $current_user_id = bp_loggedin_user_id();
325
 
326
+ /**
327
+ * - Only admins can create friendship requests for other people.
328
+ * - Admins can't create friendship requests to themselves from other people.
329
+ * - Users can't create friendship requests to themselves from other people.
330
+ */
331
+ if (
332
+ ( $current_user_id !== $initiator_id->ID && ! $is_moderator )
333
+ || ( $current_user_id === $friend_id->ID && $is_moderator )
334
+ || ( ! in_array( $current_user_id, [ $initiator_id->ID, $friend_id->ID ], true ) && ! $is_moderator )
335
+ ) {
336
  return new WP_Error(
337
  'bp_rest_friends_create_item_failed',
338
  __( 'You are not allowed to perform this action.', 'buddypress' ),
343
  }
344
 
345
  // Only admins can force a friendship request.
346
+ $force = ( true === $request->get_param( 'force' ) && $is_moderator );
 
 
 
347
 
348
  // Adding friendship.
349
  if ( ! friends_add_friend( $initiator_id->ID, $friend_id->ID, $force ) ) {
399
  * @since 6.0.0
400
  *
401
  * @param WP_REST_Request $request Full details about the request.
402
+ * @return true|WP_Error
403
  */
404
  public function create_item_permissions_check( $request ) {
405
  $retval = $this->get_item_permissions_check( $request );
409
  *
410
  * @since 6.0.0
411
  *
412
+ * @param true|WP_Error $retval Returned value.
413
  * @param WP_REST_Request $request The request sent to the API.
414
  */
415
  return apply_filters( 'bp_rest_friends_create_item_permissions_check', $retval, $request );
494
  * @since 6.0.0
495
  *
496
  * @param WP_REST_Request $request Full details about the request.
497
+ * @return true|WP_Error
498
  */
499
  public function update_item_permissions_check( $request ) {
500
  $retval = $this->get_item_permissions_check( $request );
504
  *
505
  * @since 6.0.0
506
  *
507
+ * @param true|WP_Error $retval Returned value.
508
  * @param WP_REST_Request $request The request sent to the API.
509
  */
510
  return apply_filters( 'bp_rest_friends_update_item_permissions_check', $retval, $request );
610
  * @since 6.0.0
611
  *
612
  * @param WP_REST_Request $request Full details about the request.
613
+ * @return true|WP_Error
614
  */
615
  public function delete_item_permissions_check( $request ) {
616
  $retval = $this->get_item_permissions_check( $request );
620
  *
621
  * @since 6.0.0
622
  *
623
+ * @param true|WP_Error $retval Returned value.
624
  * @param WP_REST_Request $request The request sent to the API.
625
  */
626
  return apply_filters( 'bp_rest_friends_delete_item_permissions_check', $retval, $request );
bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php CHANGED
@@ -166,20 +166,20 @@ class BP_REST_Attachments_Group_Avatar_Endpoint extends WP_REST_Controller {
166
  * @since 5.0.0
167
  *
168
  * @param WP_REST_Request $request Full details about the request.
169
- * @return bool|WP_Error
170
  */
171
  public function get_item_permissions_check( $request ) {
172
- $retval = true;
 
 
 
 
 
 
173
  $this->group = $this->groups_endpoint->get_group_object( $request );
174
 
175
- if ( ! $this->group ) {
176
- $retval = new WP_Error(
177
- 'bp_rest_group_invalid_id',
178
- __( 'Invalid group ID.', 'buddypress' ),
179
- array(
180
- 'status' => 404,
181
- )
182
- );
183
  }
184
 
185
  /**
@@ -187,7 +187,7 @@ class BP_REST_Attachments_Group_Avatar_Endpoint extends WP_REST_Controller {
187
  *
188
  * @since 5.0.0
189
  *
190
- * @param bool|WP_Error $retval Returned value.
191
  * @param WP_REST_Request $request The request sent to the API.
192
  */
193
  return apply_filters( 'bp_rest_attachments_group_avatar_get_item_permissions_check', $retval, $request );
@@ -251,32 +251,31 @@ class BP_REST_Attachments_Group_Avatar_Endpoint extends WP_REST_Controller {
251
  * @since 5.0.0
252
  *
253
  * @param WP_REST_Request $request Full details about the request.
254
- * @return bool|WP_Error
255
  */
256
  public function create_item_permissions_check( $request ) {
257
  $retval = $this->get_item_permissions_check( $request );
258
 
259
- if ( true === $retval && ( bp_disable_group_avatar_uploads() || false === buddypress()->avatar->show_avatars ) ) {
260
- $retval = new WP_Error(
261
- 'bp_rest_attachments_group_avatar_disabled',
262
- __( 'Sorry, group avatar upload is disabled.', 'buddypress' ),
263
- array(
264
- 'status' => 500,
265
- )
266
- );
267
- }
268
-
269
- if ( true === $retval
270
- && ! groups_is_user_admin( bp_loggedin_user_id(), $this->group->id )
271
- && ! current_user_can( 'bp_moderate' )
272
- ) {
273
- $retval = new WP_Error(
274
- 'bp_rest_authorization_required',
275
- __( 'Sorry, you are not authorized to perform this action.', 'buddypress' ),
276
- array(
277
- 'status' => rest_authorization_required_code(),
278
- )
279
- );
280
  }
281
 
282
  /**
@@ -284,7 +283,7 @@ class BP_REST_Attachments_Group_Avatar_Endpoint extends WP_REST_Controller {
284
  *
285
  * @since 5.0.0
286
  *
287
- * @param bool|WP_Error $retval Returned value.
288
  * @param WP_REST_Request $request The request sent to the API.
289
  */
290
  return apply_filters( 'bp_rest_attachments_group_avatar_create_item_permissions_check', $retval, $request );
@@ -373,7 +372,7 @@ class BP_REST_Attachments_Group_Avatar_Endpoint extends WP_REST_Controller {
373
  * @since 5.0.0
374
  *
375
  * @param WP_REST_Request $request Full details about the request.
376
- * @return bool|WP_Error
377
  */
378
  public function delete_item_permissions_check( $request ) {
379
  $retval = $this->create_item_permissions_check( $request );
@@ -383,7 +382,7 @@ class BP_REST_Attachments_Group_Avatar_Endpoint extends WP_REST_Controller {
383
  *
384
  * @since 5.0.0
385
  *
386
- * @param bool|WP_Error $retval Returned value.
387
  * @param WP_REST_Request $request The request sent to the API.
388
  */
389
  return apply_filters( 'bp_rest_attachments_group_avatar_delete_item_permissions_check', $retval, $request );
166
  * @since 5.0.0
167
  *
168
  * @param WP_REST_Request $request Full details about the request.
169
+ * @return true|WP_Error
170
  */
171
  public function get_item_permissions_check( $request ) {
172
+ $retval = new WP_Error(
173
+ 'bp_rest_group_invalid_id',
174
+ __( 'Invalid group ID.', 'buddypress' ),
175
+ array(
176
+ 'status' => 404,
177
+ )
178
+ );
179
  $this->group = $this->groups_endpoint->get_group_object( $request );
180
 
181
+ if ( false !== $this->group ) {
182
+ $retval = true;
 
 
 
 
 
 
183
  }
184
 
185
  /**
187
  *
188
  * @since 5.0.0
189
  *
190
+ * @param true|WP_Error $retval Returned value.
191
  * @param WP_REST_Request $request The request sent to the API.
192
  */
193
  return apply_filters( 'bp_rest_attachments_group_avatar_get_item_permissions_check', $retval, $request );
251
  * @since 5.0.0
252
  *
253
  * @param WP_REST_Request $request Full details about the request.
254
+ * @return true|WP_Error
255
  */
256
  public function create_item_permissions_check( $request ) {
257
  $retval = $this->get_item_permissions_check( $request );
258
 
259
+ if ( ! is_wp_error( $retval ) ) {
260
+ if ( bp_disable_group_avatar_uploads() || false === buddypress()->avatar->show_avatars ) {
261
+ $retval = new WP_Error(
262
+ 'bp_rest_attachments_group_avatar_disabled',
263
+ __( 'Sorry, group avatar upload is disabled.', 'buddypress' ),
264
+ array(
265
+ 'status' => 500,
266
+ )
267
+ );
268
+ } elseif ( groups_is_user_admin( bp_loggedin_user_id(), $this->group->id ) || current_user_can( 'bp_moderate' ) ) {
269
+ $retval = true;
270
+ } else {
271
+ $retval = new WP_Error(
272
+ 'bp_rest_authorization_required',
273
+ __( 'Sorry, you are not authorized to perform this action.', 'buddypress' ),
274
+ array(
275
+ 'status' => rest_authorization_required_code(),
276
+ )
277
+ );
278
+ }
 
279
  }
280
 
281
  /**
283
  *
284
  * @since 5.0.0
285
  *
286
+ * @param true|WP_Error $retval Returned value.
287
  * @param WP_REST_Request $request The request sent to the API.
288
  */
289
  return apply_filters( 'bp_rest_attachments_group_avatar_create_item_permissions_check', $retval, $request );
372
  * @since 5.0.0
373
  *
374
  * @param WP_REST_Request $request Full details about the request.
375
+ * @return true|WP_Error
376
  */
377
  public function delete_item_permissions_check( $request ) {
378
  $retval = $this->create_item_permissions_check( $request );
382
  *
383
  * @since 5.0.0
384
  *
385
+ * @param true|WP_Error $retval Returned value.
386
  * @param WP_REST_Request $request The request sent to the API.
387
  */
388
  return apply_filters( 'bp_rest_attachments_group_avatar_delete_item_permissions_check', $retval, $request );
bp-groups/classes/class-bp-rest-attachments-group-cover-endpoint.php CHANGED
@@ -152,20 +152,20 @@ class BP_REST_Attachments_Group_Cover_Endpoint extends WP_REST_Controller {
152
  * @since 6.0.0
153
  *
154
  * @param WP_REST_Request $request Full details about the request.
155
- * @return bool|WP_Error
156
  */
157
  public function get_item_permissions_check( $request ) {
158
- $retval = true;
 
 
 
 
 
 
159
  $this->group = $this->groups_endpoint->get_group_object( $request );
160
 
161
- if ( ! $this->group ) {
162
- $retval = new WP_Error(
163
- 'bp_rest_group_invalid_id',
164
- __( 'Invalid group id.', 'buddypress' ),
165
- array(
166
- 'status' => 404,
167
- )
168
- );
169
  }
170
 
171
  /**
@@ -173,7 +173,7 @@ class BP_REST_Attachments_Group_Cover_Endpoint extends WP_REST_Controller {
173
  *
174
  * @since 6.0.0
175
  *
176
- * @param bool|WP_Error $retval Returned value.
177
  * @param WP_REST_Request $request The request sent to the API.
178
  */
179
  return apply_filters( 'bp_rest_attachments_group_cover_get_item_permissions_check', $retval, $request );
@@ -237,12 +237,12 @@ class BP_REST_Attachments_Group_Cover_Endpoint extends WP_REST_Controller {
237
  * @since 6.0.0
238
  *
239
  * @param WP_REST_Request $request Full details about the request.
240
- * @return bool|WP_Error
241
  */
242
  public function create_item_permissions_check( $request ) {
243
  $retval = $this->delete_item_permissions_check( $request );
244
 
245
- if ( true === $retval && bp_disable_group_cover_image_uploads() ) {
246
  $retval = new WP_Error(
247
  'bp_rest_attachments_group_cover_disabled',
248
  __( 'Sorry, group cover upload is disabled.', 'buddypress' ),
@@ -257,7 +257,7 @@ class BP_REST_Attachments_Group_Cover_Endpoint extends WP_REST_Controller {
257
  *
258
  * @since 6.0.0
259
  *
260
- * @param bool|WP_Error $retval Returned value.
261
  * @param WP_REST_Request $request The request sent to the API.
262
  */
263
  return apply_filters( 'bp_rest_attachments_group_cover_create_item_permissions_check', $retval, $request );
@@ -322,37 +322,43 @@ class BP_REST_Attachments_Group_Cover_Endpoint extends WP_REST_Controller {
322
  * @since 6.0.0
323
  *
324
  * @param WP_REST_Request $request Full details about the request.
325
- * @return bool|WP_Error
326
  */
327
  public function delete_item_permissions_check( $request ) {
328
  $retval = $this->get_item_permissions_check( $request );
329
- $args = array();
330
-
331
- if ( isset( $this->group->id ) ) {
332
- $args = array(
333
- 'item_id' => (int) $this->group->id,
334
- 'object' => $this->object,
335
- );
336
- }
337
 
338
- if ( true === $retval && ! is_user_logged_in() ) {
339
- $retval = new WP_Error(
 
340
  'bp_rest_authorization_required',
341
- __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
342
  array(
343
  'status' => rest_authorization_required_code(),
344
  )
345
  );
346
- }
347
 
348
- if ( true === $retval && ! empty( $args ) && ! bp_attachments_current_user_can( 'edit_cover_image', $args ) ) {
349
- $retval = new WP_Error(
350
- 'bp_rest_authorization_required',
351
- __( 'Sorry, you are not authorized to perform this action.', 'buddypress' ),
352
- array(
353
- 'status' => rest_authorization_required_code(),
354
- )
355
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  }
357
 
358
  /**
@@ -360,7 +366,7 @@ class BP_REST_Attachments_Group_Cover_Endpoint extends WP_REST_Controller {
360
  *
361
  * @since 6.0.0
362
  *
363
- * @param bool|WP_Error $retval Returned value.
364
  * @param WP_REST_Request $request The request sent to the API.
365
  */
366
  return apply_filters( 'bp_rest_attachments_group_cover_delete_item_permissions_check', $retval, $request );
152
  * @since 6.0.0
153
  *
154
  * @param WP_REST_Request $request Full details about the request.
155
+ * @return true|WP_Error
156
  */
157
  public function get_item_permissions_check( $request ) {
158
+ $retval = new WP_Error(
159
+ 'bp_rest_group_invalid_id',
160
+ __( 'Invalid group id.', 'buddypress' ),
161
+ array(
162
+ 'status' => 404,
163
+ )
164
+ );
165
  $this->group = $this->groups_endpoint->get_group_object( $request );
166
 
167
+ if ( false !== $this->group ) {
168
+ $retval = true;
 
 
 
 
 
 
169
  }
170
 
171
  /**
173
  *
174
  * @since 6.0.0
175
  *
176
+ * @param true|WP_Error $retval Returned value.
177
  * @param WP_REST_Request $request The request sent to the API.
178
  */
179
  return apply_filters( 'bp_rest_attachments_group_cover_get_item_permissions_check', $retval, $request );
237
  * @since 6.0.0
238
  *
239
  * @param WP_REST_Request $request Full details about the request.
240
+ * @return true|WP_Error
241
  */
242
  public function create_item_permissions_check( $request ) {
243
  $retval = $this->delete_item_permissions_check( $request );
244
 
245
+ if ( ! is_wp_error( $retval ) && bp_disable_group_cover_image_uploads() ) {
246
  $retval = new WP_Error(
247
  'bp_rest_attachments_group_cover_disabled',
248
  __( 'Sorry, group cover upload is disabled.', 'buddypress' ),
257
  *
258
  * @since 6.0.0
259
  *
260
+ * @param true|WP_Error $retval Returned value.
261
  * @param WP_REST_Request $request The request sent to the API.
262
  */
263
  return apply_filters( 'bp_rest_attachments_group_cover_create_item_permissions_check', $retval, $request );
322
  * @since 6.0.0
323
  *
324
  * @param WP_REST_Request $request Full details about the request.
325
+ * @return true|WP_Error
326
  */
327
  public function delete_item_permissions_check( $request ) {
328
  $retval = $this->get_item_permissions_check( $request );
 
 
 
 
 
 
 
 
329
 
330
+ if ( ! is_wp_error( $retval ) ) {
331
+ $args = array();
332
+ $error = new WP_Error(
333
  'bp_rest_authorization_required',
334
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
335
  array(
336
  'status' => rest_authorization_required_code(),
337
  )
338
  );
 
339
 
340
+ if ( ! isset( $this->group->id ) || ! isset( $this->object ) ) {
341
+ $retval = $error;
342
+ } else {
343
+ $args = array(
344
+ 'item_id' => (int) $this->group->id,
345
+ 'object' => $this->object,
346
+ );
347
+
348
+ if ( ! is_user_logged_in() ) {
349
+ $retval = new WP_Error(
350
+ 'bp_rest_authorization_required',
351
+ __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
352
+ array(
353
+ 'status' => rest_authorization_required_code(),
354
+ )
355
+ );
356
+ } elseif ( bp_attachments_current_user_can( 'edit_cover_image', $args ) ) {
357
+ $retval = true;
358
+ } else {
359
+ $retval = $error;
360
+ }
361
+ }
362
  }
363
 
364
  /**
366
  *
367
  * @since 6.0.0
368
  *
369
+ * @param true|WP_Error $retval Returned value.
370
  * @param WP_REST_Request $request The request sent to the API.
371
  */
372
  return apply_filters( 'bp_rest_attachments_group_cover_delete_item_permissions_check', $retval, $request );
bp-groups/classes/class-bp-rest-group-invites-endpoint.php CHANGED
@@ -182,19 +182,20 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
182
  * @return bool|WP_Error
183
  */
184
  public function get_items_permissions_check( $request ) {
185
- $retval = true;
186
- $user_id = bp_loggedin_user_id();
187
- $user_id_arg = $request['user_id'];
188
- $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
189
- $inviter = bp_rest_get_user( $request['inviter_id'] );
190
-
191
- // If the query is not restricted by group or user, limit it to the current user, if not an admin.
192
- if ( ! $request['group_id'] && ! $request['user_id'] && ! bp_current_user_can( 'bp_moderate' ) ) {
193
- $user_id_arg = $user_id;
194
- }
195
- $user = bp_rest_get_user( $user_id_arg );
 
196
 
197
- if ( ! $user_id ) {
198
  $retval = new WP_Error(
199
  'bp_rest_authorization_required',
200
  __( 'Sorry, you need to be logged in to see the group invitations.', 'buddypress' ),
@@ -202,63 +203,89 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
202
  'status' => rest_authorization_required_code(),
203
  )
204
  );
205
- }
206
-
207
- // If a group ID has been passed, check that it is valid.
208
- if ( true === $retval && $request['group_id'] && ! $group instanceof BP_Groups_Group ) {
209
- $retval = new WP_Error(
210
- 'bp_rest_group_invalid_id',
211
- __( 'Invalid group ID.', 'buddypress' ),
212
- array(
213
- 'status' => 404,
214
- )
215
- );
216
- }
217
-
218
- // If a user ID has been passed, check that it is valid.
219
- if ( true === $retval && $user_id_arg && ! $user instanceof WP_User ) {
220
- $retval = new WP_Error(
221
- 'bp_rest_member_invalid_id',
222
- __( 'Invalid member ID.', 'buddypress' ),
223
- array(
224
- 'status' => 404,
225
- )
226
- );
227
- }
228
-
229
- // If an inviter ID has been passed, check that it is valid.
230
- if ( true === $retval && $request['inviter_id'] && ! $inviter instanceof WP_User ) {
231
- $retval = new WP_Error(
232
- 'bp_rest_member_invalid_id',
233
- __( 'Invalid member ID.', 'buddypress' ),
234
- array(
235
- 'status' => 404,
236
- )
237
- );
238
 
239
- }
240
 
241
- /**
242
- * Users can see invitations if they
243
- * - are a site admin
244
- * - are a group admin of the subject group (group_id must be specified)
245
- * - are the invite recipient (user_id must be specified)
246
- * - are the inviter (inviter_id must be specified)
247
- * So, the request must be scoped if the user is not a site admin.
248
- */
249
- if ( true === $retval
250
- && ! bp_current_user_can( 'bp_moderate' )
251
- && ( $request['group_id'] && ! $this->can_see( $request['group_id'] ) )
252
- && $user_id_arg !== $user_id
253
- && $request['inviter_id'] !== $user_id
254
- ) {
255
- $retval = new WP_Error(
256
- 'bp_rest_group_invites_cannot_get_items',
257
- __( 'Sorry, you are not allowed to fetch group invitations with those arguments.', 'buddypress' ),
258
- array(
259
- 'status' => rest_authorization_required_code(),
260
- )
261
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  }
263
 
264
  /**
@@ -266,7 +293,7 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
266
  *
267
  * @since 5.0.0
268
  *
269
- * @param bool|WP_Error $retval Whether the request can continue.
270
  * @param WP_REST_Request $request The request sent to the API.
271
  */
272
  return apply_filters( 'bp_rest_group_invites_get_items_permissions_check', $retval, $request );
@@ -308,12 +335,17 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
308
  * @since 5.0.0
309
  *
310
  * @param WP_REST_Request $request Full details about the request.
311
- * @return bool|WP_Error
312
  */
313
  public function get_item_permissions_check( $request ) {
314
  $user_id = bp_loggedin_user_id();
315
- $invite = $this->fetch_single_invite( $request['invite_id'] );
316
- $retval = true;
 
 
 
 
 
317
 
318
  if ( ! $user_id ) {
319
  $retval = new WP_Error(
@@ -323,36 +355,35 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
323
  'status' => rest_authorization_required_code(),
324
  )
325
  );
326
- }
327
-
328
- if ( true === $retval && ! $invite ) {
329
- $retval = new WP_Error(
330
- 'bp_rest_group_invite_invalid_id',
331
- __( 'Invalid group invitation ID.', 'buddypress' ),
332
- array(
333
- 'status' => 404,
334
- )
335
- );
336
- }
337
-
338
- /**
339
- * Users can see a specific invitation if they
340
- * - are a site admin
341
- * - are a group admin of the subject group
342
- * - are the invite recipient
343
- * - are the inviter
344
- */
345
- if ( true === $retval
346
- && ! bp_current_user_can( 'bp_moderate' )
347
- && ! $this->can_see( $invite->item_id )
348
- && ! in_array( $user_id, array( $invite->user_id, $invite->inviter_id ), true ) ) {
349
- $retval = new WP_Error(
350
- 'bp_rest_group_invites_cannot_get_item',
351
- __( 'Sorry, you are not allowed to fetch an invitation.', 'buddypress' ),
352
- array(
353
- 'status' => rest_authorization_required_code(),
354
- )
355
- );
356
  }
357
 
358
  /**
@@ -360,7 +391,7 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
360
  *
361
  * @since 5.0.0
362
  *
363
- * @param bool|WP_Error $retval Whether the request can continue.
364
  * @param WP_REST_Request $request The request sent to the API.
365
  */
366
  return apply_filters( 'bp_rest_group_invites_get_item_permissions_check', $retval, $request );
@@ -436,14 +467,17 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
436
  * @since 5.0.0
437
  *
438
  * @param WP_REST_Request $request Full details about the request.
439
- * @return bool|WP_Error
440
  */
441
  public function create_item_permissions_check( $request ) {
442
  $inviter_id_arg = $request['inviter_id'] ? $request['inviter_id'] : bp_loggedin_user_id();
443
- $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
444
- $user = bp_rest_get_user( $request['user_id'] );
445
- $inviter = bp_rest_get_user( $inviter_id_arg );
446
- $retval = true;
 
 
 
447
 
448
  if ( ! is_user_logged_in() ) {
449
  $retval = new WP_Error(
@@ -453,37 +487,43 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
453
  'status' => rest_authorization_required_code(),
454
  )
455
  );
456
- }
457
-
458
- if ( true === $retval && empty( $group->id ) ) {
459
- $retval = new WP_Error(
460
- 'bp_rest_group_invalid_id',
461
- __( 'Invalid group ID.', 'buddypress' ),
462
- array(
463
- 'status' => 404,
464
- )
465
- );
466
- }
467
-
468
- if ( true === $retval && ( empty( $user->ID ) || empty( $inviter->ID ) || $user->ID === $inviter->ID ) ) {
469
- $retval = new WP_Error(
470
- 'bp_rest_member_invalid_id',
471
- __( 'Invalid member ID.', 'buddypress' ),
472
- array(
473
- 'status' => 404,
474
- )
475
- );
476
- }
477
-
478
- // Only a site admin or the user herself can extend invites.
479
- if ( true === $retval && ! bp_current_user_can( 'bp_moderate' ) && bp_loggedin_user_id() !== $inviter_id_arg ) {
480
- $retval = new WP_Error(
481
- 'bp_rest_group_invite_cannot_create_item',
482
- __( 'Sorry, you are not allowed to create the invitation as requested.', 'buddypress' ),
483
- array(
484
- 'status' => rest_authorization_required_code(),
485
- )
486
- );
 
 
 
 
 
 
487
  }
488
 
489
  /**
@@ -491,7 +531,7 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
491
  *
492
  * @since 5.0.0
493
  *
494
- * @param bool|WP_Error $retval Whether the request can continue.
495
  * @param WP_REST_Request $request The request sent to the API.
496
  */
497
  return apply_filters( 'bp_rest_group_invites_create_item_permissions_check', $retval, $request );
@@ -552,12 +592,17 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
552
  * @since 5.0.0
553
  *
554
  * @param WP_REST_Request $request Full details about the request.
555
- * @return bool|WP_Error
556
  */
557
  public function update_item_permissions_check( $request ) {
558
- $retval = true;
 
 
 
 
 
 
559
  $user_id = bp_loggedin_user_id();
560
- $invite = $this->fetch_single_invite( $request['invite_id'] );
561
 
562
  if ( ! $user_id ) {
563
  $retval = new WP_Error(
@@ -567,29 +612,28 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
567
  'status' => rest_authorization_required_code(),
568
  )
569
  );
570
- }
571
-
572
- if ( true === $retval && ! $invite ) {
573
- $retval = new WP_Error(
574
- 'bp_rest_group_invite_invalid_id',
575
- __( 'Invalid group invitation ID.', 'buddypress' ),
576
- array(
577
- 'status' => 404,
578
- )
579
- );
580
- }
581
-
582
- // Only the invitee or a site admin should be able to accept an invitation.
583
- if ( true === $retval
584
- && ! bp_current_user_can( 'bp_moderate' )
585
- && $user_id !== $invite->user_id ) {
586
- $retval = new WP_Error(
587
- 'bp_rest_group_invite_cannot_update_item',
588
- __( 'Sorry, you are not allowed to accept the invitation as requested.', 'buddypress' ),
589
- array(
590
- 'status' => rest_authorization_required_code(),
591
- )
592
- );
593
  }
594
 
595
  /**
@@ -597,7 +641,7 @@ class BP_REST_Group_Invites_Endpoint extends WP_REST_Controller {
597
  *
598
  * @since 5.0.0
599
  *
600
- * @param bool|WP_Error $retval Whether the request can continue.
601
  * @param WP_REST_Request $request The request sent to the API.
602
  */
603
  return apply_filters( 'bp_rest_group_invites_update_item_permissions_check', $retval, $request );
182
  * @return bool|WP_Error
183
  */
184
  public function get_items_permissions_check( $request ) {
185
+ $error = new WP_Error(
186
+ 'bp_rest_group_invites_cannot_get_items',
187
+ __( 'Sorry, you are not allowed to fetch group invitations with those arguments.', 'buddypress' ),
188
+ array(
189
+ 'status' => rest_authorization_required_code(),
190
+ )
191
+ );
192
+ $retval = $error;
193
+ $group_id = (int) $request['group_id'];
194
+ $current_user_id = (int) bp_loggedin_user_id();
195
+ $user_id_arg = (int) $request['user_id'];
196
+ $inviter_id = (int) $request['inviter_id'];
197
 
198
+ if ( ! is_user_logged_in() ) {
199
  $retval = new WP_Error(
200
  'bp_rest_authorization_required',
201
  __( 'Sorry, you need to be logged in to see the group invitations.', 'buddypress' ),
203
  'status' => rest_authorization_required_code(),
204
  )
205
  );
206
+ } elseif ( $group_id ) {
207
+ if ( ! $user_id_arg ) {
208
+ $user_id_arg = $current_user_id;
209
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
211
+ $user = bp_rest_get_user( $user_id_arg );
212
 
213
+ // Check the user is valid.
214
+ if ( ! $user instanceof WP_User ) {
215
+ $retval = new WP_Error(
216
+ 'bp_rest_member_invalid_id',
217
+ __( 'Invalid member ID.', 'buddypress' ),
218
+ array(
219
+ 'status' => 404,
220
+ )
221
+ );
222
+ } else {
223
+ $group = $this->groups_endpoint->get_group_object( $group_id );
224
+
225
+ // Check the group is valid.
226
+ if ( ! $group instanceof BP_Groups_Group ) {
227
+ $retval = new WP_Error(
228
+ 'bp_rest_group_invalid_id',
229
+ __( 'Invalid group ID.', 'buddypress' ),
230
+ array(
231
+ 'status' => 404,
232
+ )
233
+ );
234
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || $this->can_see( $group->id ) ) {
235
+ /*
236
+ * Users can see invitations if they
237
+ * - are a site admin,
238
+ * - are a group admin of the subject group (group_id must be specified).
239
+ */
240
+ $retval = true;
241
+ } else {
242
+ $retval = $error;
243
+ }
244
+ }
245
+ } elseif ( $user_id_arg ) {
246
+ $user = bp_rest_get_user( $user_id_arg );
247
+
248
+ // Check the user is valid.
249
+ if ( ! $user instanceof WP_User ) {
250
+ $retval = new WP_Error(
251
+ 'bp_rest_member_invalid_id',
252
+ __( 'Invalid member ID.', 'buddypress' ),
253
+ array(
254
+ 'status' => 404,
255
+ )
256
+ );
257
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || $user->ID === $current_user_id ) {
258
+ /*
259
+ * Users can see invitations if they:
260
+ * - are a site admin,
261
+ * - are the invite recipient (user_id must be specified).
262
+ */
263
+ $retval = true;
264
+ } else {
265
+ $retval = $error;
266
+ }
267
+ } elseif ( $request['inviter_id'] ) {
268
+ $inviter = bp_rest_get_user( $request['inviter_id'] );
269
+
270
+ // Check the inviter is valid.
271
+ if ( ! $inviter instanceof WP_User ) {
272
+ $retval = new WP_Error(
273
+ 'bp_rest_member_invalid_id',
274
+ __( 'Invalid member ID.', 'buddypress' ),
275
+ array(
276
+ 'status' => 404,
277
+ )
278
+ );
279
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || $inviter->ID === $current_user_id ) {
280
+ /*
281
+ * Users can see invitations if they:
282
+ * - are a site admin,
283
+ * - are the inviter (inviter_id must be specified).
284
+ */
285
+ $retval = true;
286
+ } else {
287
+ $retval = $error;
288
+ }
289
  }
290
 
291
  /**
293
  *
294
  * @since 5.0.0
295
  *
296
+ * @param true|WP_Error $retval Whether the request can continue.
297
  * @param WP_REST_Request $request The request sent to the API.
298
  */
299
  return apply_filters( 'bp_rest_group_invites_get_items_permissions_check', $retval, $request );
335
  * @since 5.0.0
336
  *
337
  * @param WP_REST_Request $request Full details about the request.
338
+ * @return true|WP_Error
339
  */
340
  public function get_item_permissions_check( $request ) {
341
  $user_id = bp_loggedin_user_id();
342
+ $retval = new WP_Error(
343
+ 'bp_rest_authorization_required',
344
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
345
+ array(
346
+ 'status' => rest_authorization_required_code(),
347
+ )
348
+ );
349
 
350
  if ( ! $user_id ) {
351
  $retval = new WP_Error(
355
  'status' => rest_authorization_required_code(),
356
  )
357
  );
358
+ } else {
359
+ $invite = $this->fetch_single_invite( $request['invite_id'] );
360
+
361
+ if ( ! $invite ) {
362
+ $retval = new WP_Error(
363
+ 'bp_rest_group_invite_invalid_id',
364
+ __( 'Invalid group invitation ID.', 'buddypress' ),
365
+ array(
366
+ 'status' => 404,
367
+ )
368
+ );
369
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || $this->can_see( $invite->item_id ) || in_array( $user_id, array( $invite->user_id, $invite->inviter_id ), true ) ) {
370
+ /*
371
+ * Users can see a specific invitation if they
372
+ * - are a site admin
373
+ * - are a group admin of the subject group
374
+ * - are the invite recipient
375
+ * - are the inviter
376
+ */
377
+ $retval = true;
378
+ } else {
379
+ $retval = new WP_Error(
380
+ 'bp_rest_group_invites_cannot_get_item',
381
+ __( 'Sorry, you are not allowed to fetch an invitation.', 'buddypress' ),
382
+ array(
383
+ 'status' => rest_authorization_required_code(),
384
+ )
385
+ );
386
+ }
 
387
  }
388
 
389
  /**
391
  *
392
  * @since 5.0.0
393
  *
394
+ * @param true|WP_Error $retval Whether the request can continue.
395
  * @param WP_REST_Request $request The request sent to the API.
396
  */
397
  return apply_filters( 'bp_rest_group_invites_get_item_permissions_check', $retval, $request );
467
  * @since 5.0.0
468
  *
469
  * @param WP_REST_Request $request Full details about the request.
470
+ * @return true|WP_Error
471
  */
472
  public function create_item_permissions_check( $request ) {
473
  $inviter_id_arg = $request['inviter_id'] ? $request['inviter_id'] : bp_loggedin_user_id();
474
+ $retval = new WP_Error(
475
+ 'bp_rest_authorization_required',
476
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
477
+ array(
478
+ 'status' => rest_authorization_required_code(),
479
+ )
480
+ );
481
 
482
  if ( ! is_user_logged_in() ) {
483
  $retval = new WP_Error(
487
  'status' => rest_authorization_required_code(),
488
  )
489
  );
490
+ } else {
491
+ $user = bp_rest_get_user( $request['user_id'] );
492
+ $inviter = bp_rest_get_user( $inviter_id_arg );
493
+
494
+ if ( empty( $user->ID ) || empty( $inviter->ID ) || $user->ID === $inviter->ID ) {
495
+ $retval = new WP_Error(
496
+ 'bp_rest_member_invalid_id',
497
+ __( 'Invalid member ID.', 'buddypress' ),
498
+ array(
499
+ 'status' => 404,
500
+ )
501
+ );
502
+ } else {
503
+ $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
504
+
505
+ if ( empty( $group->id ) ) {
506
+ $retval = new WP_Error(
507
+ 'bp_rest_group_invalid_id',
508
+ __( 'Invalid group ID.', 'buddypress' ),
509
+ array(
510
+ 'status' => 404,
511
+ )
512
+ );
513
+ } else {
514
+ if ( bp_current_user_can( 'bp_moderate' ) || bp_loggedin_user_id() === $inviter_id_arg ) {
515
+ $retval = true;
516
+ } else {
517
+ $retval = new WP_Error(
518
+ 'bp_rest_group_invite_cannot_create_item',
519
+ __( 'Sorry, you are not allowed to create the invitation as requested.', 'buddypress' ),
520
+ array(
521
+ 'status' => rest_authorization_required_code(),
522
+ )
523
+ );
524
+ }
525
+ }
526
+ }
527
  }
528
 
529
  /**
531
  *
532
  * @since 5.0.0
533
  *
534
+ * @param true|WP_Error $retval Whether the request can continue.
535
  * @param WP_REST_Request $request The request sent to the API.
536
  */
537
  return apply_filters( 'bp_rest_group_invites_create_item_permissions_check', $retval, $request );
592
  * @since 5.0.0
593
  *
594
  * @param WP_REST_Request $request Full details about the request.
595
+ * @return true|WP_Error
596
  */
597
  public function update_item_permissions_check( $request ) {
598
+ $retval = new WP_Error(
599
+ 'bp_rest_authorization_required',
600
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
601
+ array(
602
+ 'status' => rest_authorization_required_code(),
603
+ )
604
+ );
605
  $user_id = bp_loggedin_user_id();
 
606
 
607
  if ( ! $user_id ) {
608
  $retval = new WP_Error(
612
  'status' => rest_authorization_required_code(),
613
  )
614
  );
615
+ } else {
616
+ $invite = $this->fetch_single_invite( $request['invite_id'] );
617
+
618
+ if ( ! $invite ) {
619
+ $retval = new WP_Error(
620
+ 'bp_rest_group_invite_invalid_id',
621
+ __( 'Invalid group invitation ID.', 'buddypress' ),
622
+ array(
623
+ 'status' => 404,
624
+ )
625
+ );
626
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || $user_id === $invite->user_id ) {
627
+ $retval = true;
628
+ } else {
629
+ $retval = new WP_Error(
630
+ 'bp_rest_group_invite_cannot_update_item',
631
+ __( 'Sorry, you are not allowed to accept the invitation as requested.', 'buddypress' ),
632
+ array(
633
+ 'status' => rest_authorization_required_code(),
634
+ )
635
+ );
636
+ }
 
637
  }
638
 
639
  /**
641
  *
642
  * @since 5.0.0
643
  *
644
+ * @param true|WP_Error $retval Whether the request can continue.
645
  * @param WP_REST_Request $request The request sent to the API.
646
  */
647
  return apply_filters( 'bp_rest_group_invites_update_item_permissions_check', $retval, $request );
bp-groups/classes/class-bp-rest-group-membership-endpoint.php CHANGED
@@ -188,17 +188,36 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
188
  * @since 5.0.0
189
  *
190
  * @param WP_REST_Request $request Full details about the request.
191
- * @return bool|WP_Error
192
  */
193
  public function get_items_permissions_check( $request ) {
194
- $retval = $this->groups_endpoint->get_item_permissions_check( $request );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
 
196
  /**
197
  * Filter the group members `get_items` permissions check.
198
  *
199
  * @since 5.0.0
200
  *
201
- * @param bool|WP_Error $retval Returned value.
202
  * @param WP_REST_Request $request The request sent to the API.
203
  */
204
  return apply_filters( 'bp_rest_group_members_get_items_permissions_check', $retval, $request );
@@ -294,10 +313,16 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
294
  * @since 5.0.0
295
  *
296
  * @param WP_REST_Request $request Full details about the request.
297
- * @return bool|WP_Error
298
  */
299
  public function create_item_permissions_check( $request ) {
300
- $retval = true;
 
 
 
 
 
 
301
 
302
  if ( ! is_user_logged_in() ) {
303
  $retval = new WP_Error(
@@ -307,52 +332,40 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
307
  'status' => rest_authorization_required_code(),
308
  )
309
  );
310
- }
311
-
312
- $user = bp_rest_get_user( $request['user_id'] );
313
-
314
- if ( true === $retval && ! $user instanceof WP_User ) {
315
- $retval = new WP_Error(
316
- 'bp_rest_group_member_invalid_id',
317
- __( 'Invalid group member ID.', 'buddypress' ),
318
- array(
319
- 'status' => 404,
320
- )
321
- );
322
- }
323
-
324
- $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
325
- if ( true === $retval && ! $group instanceof BP_Groups_Group ) {
326
- $retval = new WP_Error(
327
- 'bp_rest_group_invalid_id',
328
- __( 'Invalid group ID.', 'buddypress' ),
329
- array(
330
- 'status' => 404,
331
- )
332
- );
333
- }
334
-
335
- // Site administrators can do anything.
336
- if ( true === $retval && bp_current_user_can( 'bp_moderate' ) ) {
337
- $retval = true;
338
  } else {
339
-
340
  $loggedin_user_id = bp_loggedin_user_id();
341
 
342
- // Users may only freely join public groups.
343
- if ( true === $retval && (
344
- ! bp_current_user_can( 'groups_join_group', array( 'group_id' => $group->id ) )
345
- || groups_is_user_member( $loggedin_user_id, $group->id ) // As soon as they are not already members.
346
- || groups_is_user_banned( $loggedin_user_id, $group->id ) // And as soon as they are not banned from it.
347
- || $loggedin_user_id !== $user->ID // You can only add yourself to a group.
348
- ) ) {
349
  $retval = new WP_Error(
350
- 'bp_rest_group_member_failed_to_join',
351
- __( 'Could not join the group.', 'buddypress' ),
352
  array(
353
- 'status' => 500,
354
  )
355
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  }
357
  }
358
 
@@ -361,7 +374,7 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
361
  *
362
  * @since 5.0.0
363
  *
364
- * @param bool|WP_Error $retval Returned value.
365
  * @param WP_REST_Request $request The request sent to the API.
366
  */
367
  return apply_filters( 'bp_rest_group_members_create_item_permissions_check', $retval, $request );
@@ -454,10 +467,17 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
454
  * @since 5.0.0
455
  *
456
  * @param WP_REST_Request $request Full details about the request.
457
- * @return WP_Error|bool
458
  */
459
  public function update_item_permissions_check( $request ) {
460
- $retval = true;
 
 
 
 
 
 
 
461
 
462
  if ( ! is_user_logged_in() ) {
463
  $retval = new WP_Error(
@@ -467,55 +487,60 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
467
  'status' => rest_authorization_required_code(),
468
  )
469
  );
470
- }
471
-
472
- $user = bp_rest_get_user( $request['user_id'] );
473
-
474
- if ( true === $retval && ! $user instanceof WP_User ) {
475
- $retval = new WP_Error(
476
- 'bp_rest_group_member_invalid_id',
477
- __( 'Invalid group member ID.', 'buddypress' ),
478
- array(
479
- 'status' => 404,
480
- )
481
- );
482
- }
483
-
484
- $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
485
- if ( true === $retval && ! $group instanceof BP_Groups_Group ) {
486
- $retval = new WP_Error(
487
- 'bp_rest_group_invalid_id',
488
- __( 'Invalid group ID.', 'buddypress' ),
489
- array(
490
- 'status' => 404,
491
- )
492
- );
493
- }
494
-
495
- // Site administrators can do anything.
496
- if ( true === $retval && bp_current_user_can( 'bp_moderate' ) ) {
497
- $retval = true;
498
  } else {
499
-
500
  $loggedin_user_id = bp_loggedin_user_id();
501
- if ( true === $retval && in_array( $request['action'], [ 'ban', 'unban', 'promote', 'demote' ], true ) ) {
502
- if ( ! groups_is_user_admin( $loggedin_user_id, $group->id ) ) {
503
- $messages = array(
504
- 'ban' => __( 'Sorry, you are not allowed to ban this group member.', 'buddypress' ),
505
- 'unban' => __( 'Sorry, you are not allowed to unban this group member.', 'buddypress' ),
506
- 'promote' => __( 'Sorry, you are not allowed to promote this group member.', 'buddypress' ),
507
- 'demote' => __( 'Sorry, you are not allowed to demote this group member.', 'buddypress' ),
508
- );
509
 
510
- $retval = new WP_Error(
511
- 'bp_rest_group_member_cannot_' . $request['action'],
512
- $messages[ $request['action'] ],
513
- array(
514
- 'status' => rest_authorization_required_code(),
515
- )
516
- );
517
- } else {
518
- $retval = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
  }
520
  }
521
  }
@@ -525,7 +550,7 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
525
  *
526
  * @since 5.0.0
527
  *
528
- * @param bool|WP_Error $retval Returned value.
529
  * @param WP_REST_Request $request The request sent to the API.
530
  */
531
  return apply_filters( 'bp_rest_group_members_update_item_permissions_check', $retval, $request );
@@ -591,10 +616,17 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
591
  * @since 5.0.0
592
  *
593
  * @param WP_REST_Request $request Full details about the request.
594
- * @return WP_Error|bool
595
  */
596
  public function delete_item_permissions_check( $request ) {
597
- $retval = true;
 
 
 
 
 
 
 
598
 
599
  if ( ! is_user_logged_in() ) {
600
  $retval = new WP_Error(
@@ -604,63 +636,44 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
604
  'status' => rest_authorization_required_code(),
605
  )
606
  );
607
- }
608
-
609
- $user = bp_rest_get_user( $request['user_id'] );
610
-
611
- if ( true === $retval && ! $user instanceof WP_User ) {
612
- return new WP_Error(
613
- 'bp_rest_group_member_invalid_id',
614
- __( 'Invalid group member ID.', 'buddypress' ),
615
- array(
616
- 'status' => 404,
617
- )
618
- );
619
- }
620
-
621
- $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
622
- if ( true === $retval && ! $group instanceof BP_Groups_Group ) {
623
- $retval = new WP_Error(
624
- 'bp_rest_group_invalid_id',
625
- __( 'Invalid group ID.', 'buddypress' ),
626
- array(
627
- 'status' => 404,
628
- )
629
- );
630
- }
631
-
632
- // Site administrators can do anything.
633
- if ( true === $retval && bp_current_user_can( 'bp_moderate' ) ) {
634
- $retval = true;
635
- } elseif ( true === $retval ) {
636
-
637
  $loggedin_user_id = bp_loggedin_user_id();
638
 
639
- if ( $user->ID !== $loggedin_user_id ) {
640
- if ( true === $retval && ! groups_is_user_admin( $loggedin_user_id, $group->id ) ) {
641
- $retval = new WP_Error(
642
- 'bp_rest_authorization_required',
643
- __( 'Sorry, you need to be logged in to view a group membership.', 'buddypress' ),
644
- array(
645
- 'status' => rest_authorization_required_code(),
646
- )
647
- );
648
- }
649
  } else {
650
- // Special case for self-removal: don't allow if it'd leave a group with no admins.
651
- $user = bp_rest_get_user( $request['user_id'] );
652
- $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
653
- $loggedin_user_id = bp_loggedin_user_id();
654
 
655
- $group_admins = groups_get_group_admins( $group->id );
656
- if ( true === $retval && 1 === count( $group_admins ) && $loggedin_user_id === $group_admins[0]->user_id && $user->ID === $loggedin_user_id ) {
657
  $retval = new WP_Error(
658
- 'bp_rest_authorization_required',
659
- __( 'Sorry, you need to be logged in to view a group membership.', 'buddypress' ),
660
  array(
661
- 'status' => rest_authorization_required_code(),
662
  )
663
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
664
  }
665
  }
666
  }
@@ -670,7 +683,7 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
670
  *
671
  * @since 5.0.0
672
  *
673
- * @param bool|WP_Error $retval Returned value.
674
  * @param WP_REST_Request $request The request sent to the API.
675
  */
676
  return apply_filters( 'bp_rest_group_members_delete_item_permissions_check', $retval, $request );
188
  * @since 5.0.0
189
  *
190
  * @param WP_REST_Request $request Full details about the request.
191
+ * @return true|WP_Error
192
  */
193
  public function get_items_permissions_check( $request ) {
194
+ $retval = new WP_Error(
195
+ 'bp_rest_authorization_required',
196
+ __( 'Sorry, you cannot view the group.', 'buddypress' ),
197
+ array(
198
+ 'status' => rest_authorization_required_code(),
199
+ )
200
+ );
201
+ $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
202
+
203
+ if ( empty( $group->id ) ) {
204
+ $retval = new WP_Error(
205
+ 'bp_rest_group_invalid_id',
206
+ __( 'Invalid group ID.', 'buddypress' ),
207
+ array(
208
+ 'status' => 404,
209
+ )
210
+ );
211
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || 'public' === $group->status || groups_is_user_member( bp_loggedin_user_id(), $group->id ) ) {
212
+ $retval = true;
213
+ }
214
 
215
  /**
216
  * Filter the group members `get_items` permissions check.
217
  *
218
  * @since 5.0.0
219
  *
220
+ * @param true|WP_Error $retval Returned value.
221
  * @param WP_REST_Request $request The request sent to the API.
222
  */
223
  return apply_filters( 'bp_rest_group_members_get_items_permissions_check', $retval, $request );
313
  * @since 5.0.0
314
  *
315
  * @param WP_REST_Request $request Full details about the request.
316
+ * @return true|WP_Error
317
  */
318
  public function create_item_permissions_check( $request ) {
319
+ $retval = new WP_Error(
320
+ 'bp_rest_authorization_required',
321
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
322
+ array(
323
+ 'status' => rest_authorization_required_code(),
324
+ )
325
+ );
326
 
327
  if ( ! is_user_logged_in() ) {
328
  $retval = new WP_Error(
332
  'status' => rest_authorization_required_code(),
333
  )
334
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  } else {
336
+ $user = bp_rest_get_user( $request['user_id'] );
337
  $loggedin_user_id = bp_loggedin_user_id();
338
 
339
+ if ( ! $user instanceof WP_User ) {
 
 
 
 
 
 
340
  $retval = new WP_Error(
341
+ 'bp_rest_group_member_invalid_id',
342
+ __( 'Invalid group member ID.', 'buddypress' ),
343
  array(
344
+ 'status' => 404,
345
  )
346
  );
347
+ } else {
348
+ $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
349
+
350
+ if ( ! $group instanceof BP_Groups_Group ) {
351
+ $retval = new WP_Error(
352
+ 'bp_rest_group_invalid_id',
353
+ __( 'Invalid group ID.', 'buddypress' ),
354
+ array(
355
+ 'status' => 404,
356
+ )
357
+ );
358
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || ( bp_current_user_can( 'groups_join_group', array( 'group_id' => $group->id ) ) && $loggedin_user_id === $user->ID ) ) {
359
+ $retval = true;
360
+ } else {
361
+ $retval = new WP_Error(
362
+ 'bp_rest_group_member_failed_to_join',
363
+ __( 'Could not join the group.', 'buddypress' ),
364
+ array(
365
+ 'status' => 500,
366
+ )
367
+ );
368
+ }
369
  }
370
  }
371
 
374
  *
375
  * @since 5.0.0
376
  *
377
+ * @param true|WP_Error $retval Returned value.
378
  * @param WP_REST_Request $request The request sent to the API.
379
  */
380
  return apply_filters( 'bp_rest_group_members_create_item_permissions_check', $retval, $request );
467
  * @since 5.0.0
468
  *
469
  * @param WP_REST_Request $request Full details about the request.
470
+ * @return true|WP_Error
471
  */
472
  public function update_item_permissions_check( $request ) {
473
+ $error = new WP_Error(
474
+ 'bp_rest_authorization_required',
475
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
476
+ array(
477
+ 'status' => rest_authorization_required_code(),
478
+ )
479
+ );
480
+ $retval = $error;
481
 
482
  if ( ! is_user_logged_in() ) {
483
  $retval = new WP_Error(
487
  'status' => rest_authorization_required_code(),
488
  )
489
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
  } else {
491
+ $user = bp_rest_get_user( $request['user_id'] );
492
  $loggedin_user_id = bp_loggedin_user_id();
 
 
 
 
 
 
 
 
493
 
494
+ if ( ! $user instanceof WP_User ) {
495
+ $retval = new WP_Error(
496
+ 'bp_rest_group_member_invalid_id',
497
+ __( 'Invalid group member ID.', 'buddypress' ),
498
+ array(
499
+ 'status' => 404,
500
+ )
501
+ );
502
+ } else {
503
+ $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
504
+
505
+ if ( ! $group instanceof BP_Groups_Group ) {
506
+ $retval = new WP_Error(
507
+ 'bp_rest_group_invalid_id',
508
+ __( 'Invalid group ID.', 'buddypress' ),
509
+ array(
510
+ 'status' => 404,
511
+ )
512
+ );
513
+ } elseif ( bp_current_user_can( 'bp_moderate' ) ) {
514
+ $retval = true;
515
+ } elseif ( in_array( $request['action'], array( 'ban', 'unban', 'promote', 'demote' ), true ) ) {
516
+ if ( groups_is_user_admin( $loggedin_user_id, $group->id ) ) {
517
+ if ( $loggedin_user_id !== $user->ID ) {
518
+ $retval = true;
519
+ } else {
520
+ $group_admins = groups_get_group_admins( $group->id );
521
+
522
+ if ( 1 !== count( $group_admins ) ) {
523
+ $retval = true;
524
+ } else {
525
+ $retval = $error;
526
+ }
527
+ }
528
+ } else {
529
+ $messages = array(
530
+ 'ban' => __( 'Sorry, you are not allowed to ban this group member.', 'buddypress' ),
531
+ 'unban' => __( 'Sorry, you are not allowed to unban this group member.', 'buddypress' ),
532
+ 'promote' => __( 'Sorry, you are not allowed to promote this group member.', 'buddypress' ),
533
+ 'demote' => __( 'Sorry, you are not allowed to demote this group member.', 'buddypress' ),
534
+ );
535
+
536
+ $retval = new WP_Error(
537
+ 'bp_rest_group_member_cannot_' . $request['action'],
538
+ $messages[ $request['action'] ],
539
+ array(
540
+ 'status' => rest_authorization_required_code(),
541
+ )
542
+ );
543
+ }
544
  }
545
  }
546
  }
550
  *
551
  * @since 5.0.0
552
  *
553
+ * @param true|WP_Error $retval Returned value.
554
  * @param WP_REST_Request $request The request sent to the API.
555
  */
556
  return apply_filters( 'bp_rest_group_members_update_item_permissions_check', $retval, $request );
616
  * @since 5.0.0
617
  *
618
  * @param WP_REST_Request $request Full details about the request.
619
+ * @return true|WP_Error
620
  */
621
  public function delete_item_permissions_check( $request ) {
622
+ $error = new WP_Error(
623
+ 'bp_rest_authorization_required',
624
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
625
+ array(
626
+ 'status' => rest_authorization_required_code(),
627
+ )
628
+ );
629
+ $retval = $error;
630
 
631
  if ( ! is_user_logged_in() ) {
632
  $retval = new WP_Error(
636
  'status' => rest_authorization_required_code(),
637
  )
638
  );
639
+ } else {
640
+ $user = bp_rest_get_user( $request['user_id'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
641
  $loggedin_user_id = bp_loggedin_user_id();
642
 
643
+ if ( ! $user instanceof WP_User ) {
644
+ return new WP_Error(
645
+ 'bp_rest_group_member_invalid_id',
646
+ __( 'Invalid group member ID.', 'buddypress' ),
647
+ array(
648
+ 'status' => 404,
649
+ )
650
+ );
 
 
651
  } else {
652
+ $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
 
 
 
653
 
654
+ if ( ! $group instanceof BP_Groups_Group ) {
 
655
  $retval = new WP_Error(
656
+ 'bp_rest_group_invalid_id',
657
+ __( 'Invalid group ID.', 'buddypress' ),
658
  array(
659
+ 'status' => 404,
660
  )
661
  );
662
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || ( $user->ID !== $loggedin_user_id && groups_is_user_admin( $loggedin_user_id, $group->id ) ) ) {
663
+ $retval = true;
664
+ } elseif ( $user->ID === $loggedin_user_id ) {
665
+ $group_admins = groups_get_group_admins( $group->id );
666
+
667
+ // Special case for self-removal: don't allow if it'd leave a group with no admins.
668
+ if ( in_array( $loggedin_user_id, wp_list_pluck( $group_admins, 'user_id' ), true ) ) {
669
+ if ( 1 !== count( $group_admins ) ) {
670
+ $retval = true;
671
+ } else {
672
+ $retval = $error;
673
+ }
674
+ } else {
675
+ $retval = true;
676
+ }
677
  }
678
  }
679
  }
683
  *
684
  * @since 5.0.0
685
  *
686
+ * @param true|WP_Error $retval Returned value.
687
  * @param WP_REST_Request $request The request sent to the API.
688
  */
689
  return apply_filters( 'bp_rest_group_members_delete_item_permissions_check', $retval, $request );
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php CHANGED
@@ -176,10 +176,16 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
176
  * @since 5.0.0
177
  *
178
  * @param WP_REST_Request $request Full details about the request.
179
- * @return bool|WP_Error
180
  */
181
  public function get_items_permissions_check( $request ) {
182
- $retval = true;
 
 
 
 
 
 
183
  $user_id = bp_loggedin_user_id();
184
  $user_id_arg = $request['user_id'];
185
  $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
@@ -198,10 +204,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
198
  'status' => rest_authorization_required_code(),
199
  )
200
  );
201
- }
202
-
203
- // If a group ID has been passed, check that it is valid.
204
- if ( true === $retval && $request['group_id'] && ! $group instanceof BP_Groups_Group ) {
205
  $retval = new WP_Error(
206
  'bp_rest_group_invalid_id',
207
  __( 'Invalid group ID.', 'buddypress' ),
@@ -209,10 +212,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
209
  'status' => 404,
210
  )
211
  );
212
- }
213
-
214
- // If a user ID has been passed, check that it is valid.
215
- if ( true === $retval && $user_id_arg && ! $user instanceof WP_User ) {
216
  $retval = new WP_Error(
217
  'bp_rest_member_invalid_id',
218
  __( 'Invalid member ID.', 'buddypress' ),
@@ -220,13 +220,9 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
220
  'status' => 404,
221
  )
222
  );
223
- }
224
-
225
- // Site administrators can do anything. Otherwise, the user must manage the subject group or be the requester.
226
- if ( true === $retval
227
- && ! bp_current_user_can( 'bp_moderate' )
228
- && ! ( $request['group_id'] && groups_is_user_admin( $user_id, $request['group_id'] ) )
229
- && $user_id_arg !== $user_id ) {
230
  $retval = new WP_Error(
231
  'bp_rest_group_membership_requests_cannot_get_items',
232
  __( 'Sorry, you are not allowed to view membership requests.', 'buddypress' ),
@@ -241,7 +237,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
241
  *
242
  * @since 5.0.0
243
  *
244
- * @param bool|WP_Error $retval Whether the request can continue.
245
  * @param WP_REST_Request $request The request sent to the API.
246
  */
247
  return apply_filters( 'bp_rest_group_membership_requests_get_items_permissions_check', $retval, $request );
@@ -283,10 +279,16 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
283
  * @since 5.0.0
284
  *
285
  * @param WP_REST_Request $request Full details about the request.
286
- * @return bool|WP_Error
287
  */
288
  public function get_item_permissions_check( $request ) {
289
- $retval = true;
 
 
 
 
 
 
290
  $user_id = bp_loggedin_user_id();
291
  $group_request = $this->fetch_single_membership_request( $request['request_id'] );
292
 
@@ -298,9 +300,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
298
  'status' => rest_authorization_required_code(),
299
  )
300
  );
301
- }
302
-
303
- if ( true === $retval && ! $group_request ) {
304
  $retval = new WP_Error(
305
  'bp_rest_group_membership_requests_invalid_id',
306
  __( 'Invalid group membership request ID.', 'buddypress' ),
@@ -308,12 +308,9 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
308
  'status' => 404,
309
  )
310
  );
311
- }
312
-
313
- if ( true === $retval
314
- && ! bp_current_user_can( 'bp_moderate' )
315
- && $user_id !== $group_request->user_id
316
- && ! groups_is_user_admin( $user_id, $group_request->item_id ) ) {
317
  $retval = new WP_Error(
318
  'bp_rest_group_membership_requests_cannot_get_item',
319
  __( 'Sorry, you are not allowed to view a membership request.', 'buddypress' ),
@@ -328,7 +325,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
328
  *
329
  * @since 5.0.0
330
  *
331
- * @param bool|WP_Error $retval Whether the request can continue.
332
  * @param WP_REST_Request $request The request sent to the API.
333
  */
334
  return apply_filters( 'bp_rest_group_membership_requests_get_item_permissions_check', $retval, $request );
@@ -411,12 +408,18 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
411
  * @since 5.0.0
412
  *
413
  * @param WP_REST_Request $request Full details about the request.
414
- * @return bool|WP_Error
415
  */
416
  public function create_item_permissions_check( $request ) {
417
- $retval = true;
 
 
 
 
 
 
418
  $user_id = bp_loggedin_user_id();
419
- $user_id_arg = $request['user_id'] ? $request['user_id'] : bp_loggedin_user_id();
420
  $user = bp_rest_get_user( $user_id_arg );
421
  $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
422
 
@@ -429,10 +432,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
429
  'status' => rest_authorization_required_code(),
430
  )
431
  );
432
- }
433
-
434
- // Check for valid user.
435
- if ( true === $retval && ! $user instanceof WP_User ) {
436
  $retval = new WP_Error(
437
  'bp_rest_group_member_invalid_id',
438
  __( 'Invalid member ID.', 'buddypress' ),
@@ -440,10 +440,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
440
  'status' => 404,
441
  )
442
  );
443
- }
444
-
445
- // Check for valid group.
446
- if ( true === $retval && ! $group instanceof BP_Groups_Group ) {
447
  $retval = new WP_Error(
448
  'bp_rest_group_invalid_id',
449
  __( 'Invalid group ID.', 'buddypress' ),
@@ -451,12 +448,9 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
451
  'status' => 404,
452
  )
453
  );
454
- }
455
-
456
- // Normal users can only extend invitations on their own behalf.
457
- if ( true === $retval
458
- && ! bp_current_user_can( 'bp_moderate' )
459
- && $user_id !== $user_id_arg ) {
460
  $retval = new WP_Error(
461
  'bp_rest_group_membership_requests_cannot_create_item',
462
  __( 'User may not extend requests on behalf of another user.', 'buddypress' ),
@@ -471,7 +465,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
471
  *
472
  * @since 5.0.0
473
  *
474
- * @param bool|WP_Error $retval Returned value.
475
  * @param WP_REST_Request $request The request sent to the API.
476
  */
477
  return apply_filters( 'bp_rest_group_membership_requests_create_item_permissions_check', $retval, $request );
@@ -533,10 +527,16 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
533
  * @since 5.0.0
534
  *
535
  * @param WP_REST_Request $request Full details about the request.
536
- * @return bool|WP_Error
537
  */
538
  public function update_item_permissions_check( $request ) {
539
- $retval = true;
 
 
 
 
 
 
540
  $user_id = bp_loggedin_user_id();
541
  $group_request = $this->fetch_single_membership_request( $request['request_id'] );
542
 
@@ -548,9 +548,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
548
  'status' => rest_authorization_required_code(),
549
  )
550
  );
551
- }
552
-
553
- if ( true === $retval && ! $group_request ) {
554
  $retval = new WP_Error(
555
  'bp_rest_group_membership_requests_invalid_id',
556
  __( 'Invalid group membership request ID.', 'buddypress' ),
@@ -558,11 +556,9 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
558
  'status' => 404,
559
  )
560
  );
561
- }
562
-
563
- if ( true === $retval
564
- && ! bp_current_user_can( 'bp_moderate' )
565
- && ! groups_is_user_admin( $user_id, $group_request->item_id ) ) {
566
  $retval = new WP_Error(
567
  'bp_rest_group_member_request_cannot_update_item',
568
  __( 'User is not allowed to approve membership requests to this group.', 'buddypress' ),
@@ -577,7 +573,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
577
  *
578
  * @since 5.0.0
579
  *
580
- * @param bool|WP_Error $retval Whether the request can continue.
581
  * @param WP_REST_Request $request The request sent to the API.
582
  */
583
  return apply_filters( 'bp_rest_group_membership_requests_update_item_permissions_check', $retval, $request );
@@ -659,10 +655,16 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
659
  * @since 5.0.0
660
  *
661
  * @param WP_REST_Request $request Full details about the request.
662
- * @return bool|WP_Error
663
  */
664
  public function delete_item_permissions_check( $request ) {
665
- $retval = true;
 
 
 
 
 
 
666
  $user_id = bp_loggedin_user_id();
667
  $group_request = $this->fetch_single_membership_request( $request['request_id'] );
668
 
@@ -674,9 +676,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
674
  'status' => rest_authorization_required_code(),
675
  )
676
  );
677
- }
678
-
679
- if ( true === $retval && ! $group_request ) {
680
  $retval = new WP_Error(
681
  'bp_rest_group_membership_requests_invalid_id',
682
  __( 'Invalid group membership request ID.', 'buddypress' ),
@@ -684,12 +684,9 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
684
  'status' => 404,
685
  )
686
  );
687
- }
688
-
689
- if ( true === $retval
690
- && ! bp_current_user_can( 'bp_moderate' )
691
- && $user_id !== $group_request->user_id
692
- && ! groups_is_user_admin( $user_id, $group_request->item_id ) ) {
693
  $retval = new WP_Error(
694
  'bp_rest_group_membership_requests_cannot_delete_item',
695
  __( 'User is not allowed to delete this membership request.', 'buddypress' ),
@@ -704,7 +701,7 @@ class BP_REST_Group_Membership_Request_Endpoint extends WP_REST_Controller {
704
  *
705
  * @since 5.0.0
706
  *
707
- * @param bool|WP_Error $retval Whether the request may proceed.
708
  * @param WP_REST_Request $request The request sent to the API.
709
  */
710
  return apply_filters( 'bp_rest_group_membership_requests_delete_item_permissions_check', $retval, $request );
176
  * @since 5.0.0
177
  *
178
  * @param WP_REST_Request $request Full details about the request.
179
+ * @return true|WP_Error
180
  */
181
  public function get_items_permissions_check( $request ) {
182
+ $retval = new WP_Error(
183
+ 'bp_rest_authorization_required',
184
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
185
+ array(
186
+ 'status' => rest_authorization_required_code(),
187
+ )
188
+ );
189
  $user_id = bp_loggedin_user_id();
190
  $user_id_arg = $request['user_id'];
191
  $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
204
  'status' => rest_authorization_required_code(),
205
  )
206
  );
207
+ } elseif ( $request['group_id'] && ! $group instanceof BP_Groups_Group ) {
 
 
 
208
  $retval = new WP_Error(
209
  'bp_rest_group_invalid_id',
210
  __( 'Invalid group ID.', 'buddypress' ),
212
  'status' => 404,
213
  )
214
  );
215
+ } elseif ( $user_id_arg && ! $user instanceof WP_User ) {
 
 
 
216
  $retval = new WP_Error(
217
  'bp_rest_member_invalid_id',
218
  __( 'Invalid member ID.', 'buddypress' ),
220
  'status' => 404,
221
  )
222
  );
223
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || ( $request['group_id'] && groups_is_user_admin( $user_id, $request['group_id'] ) ) || $user_id_arg === $user_id ) {
224
+ $retval = true;
225
+ } else {
 
 
 
 
226
  $retval = new WP_Error(
227
  'bp_rest_group_membership_requests_cannot_get_items',
228
  __( 'Sorry, you are not allowed to view membership requests.', 'buddypress' ),
237
  *
238
  * @since 5.0.0
239
  *
240
+ * @param true|WP_Error $retval Whether the request can continue.
241
  * @param WP_REST_Request $request The request sent to the API.
242
  */
243
  return apply_filters( 'bp_rest_group_membership_requests_get_items_permissions_check', $retval, $request );
279
  * @since 5.0.0
280
  *
281
  * @param WP_REST_Request $request Full details about the request.
282
+ * @return true|WP_Error
283
  */
284
  public function get_item_permissions_check( $request ) {
285
+ $retval = new WP_Error(
286
+ 'bp_rest_authorization_required',
287
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
288
+ array(
289
+ 'status' => rest_authorization_required_code(),
290
+ )
291
+ );
292
  $user_id = bp_loggedin_user_id();
293
  $group_request = $this->fetch_single_membership_request( $request['request_id'] );
294
 
300
  'status' => rest_authorization_required_code(),
301
  )
302
  );
303
+ } elseif ( ! $group_request ) {
 
 
304
  $retval = new WP_Error(
305
  'bp_rest_group_membership_requests_invalid_id',
306
  __( 'Invalid group membership request ID.', 'buddypress' ),
308
  'status' => 404,
309
  )
310
  );
311
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || $user_id === $group_request->user_id || groups_is_user_admin( $user_id, $group_request->item_id ) ) {
312
+ $retval = true;
313
+ } else {
 
 
 
314
  $retval = new WP_Error(
315
  'bp_rest_group_membership_requests_cannot_get_item',
316
  __( 'Sorry, you are not allowed to view a membership request.', 'buddypress' ),
325
  *
326
  * @since 5.0.0
327
  *
328
+ * @param true|WP_Error $retval Whether the request can continue.
329
  * @param WP_REST_Request $request The request sent to the API.
330
  */
331
  return apply_filters( 'bp_rest_group_membership_requests_get_item_permissions_check', $retval, $request );
408
  * @since 5.0.0
409
  *
410
  * @param WP_REST_Request $request Full details about the request.
411
+ * @return true|WP_Error
412
  */
413
  public function create_item_permissions_check( $request ) {
414
+ $retval = new WP_Error(
415
+ 'bp_rest_authorization_required',
416
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
417
+ array(
418
+ 'status' => rest_authorization_required_code(),
419
+ )
420
+ );
421
  $user_id = bp_loggedin_user_id();
422
+ $user_id_arg = $request['user_id'] ? $request['user_id'] : $user_id;
423
  $user = bp_rest_get_user( $user_id_arg );
424
  $group = $this->groups_endpoint->get_group_object( $request['group_id'] );
425
 
432
  'status' => rest_authorization_required_code(),
433
  )
434
  );
435
+ } elseif ( ! $user instanceof WP_User ) {
 
 
 
436
  $retval = new WP_Error(
437
  'bp_rest_group_member_invalid_id',
438
  __( 'Invalid member ID.', 'buddypress' ),
440
  'status' => 404,
441
  )
442
  );
443
+ } elseif ( ! $group instanceof BP_Groups_Group ) {
 
 
 
444
  $retval = new WP_Error(
445
  'bp_rest_group_invalid_id',
446
  __( 'Invalid group ID.', 'buddypress' ),
448
  'status' => 404,
449
  )
450
  );
451
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || $user_id === $user_id_arg ) {
452
+ $retval = true;
453
+ } else {
 
 
 
454
  $retval = new WP_Error(
455
  'bp_rest_group_membership_requests_cannot_create_item',
456
  __( 'User may not extend requests on behalf of another user.', 'buddypress' ),
465
  *
466
  * @since 5.0.0
467
  *
468
+ * @param true|WP_Error $retval Returned value.
469
  * @param WP_REST_Request $request The request sent to the API.
470
  */
471
  return apply_filters( 'bp_rest_group_membership_requests_create_item_permissions_check', $retval, $request );
527
  * @since 5.0.0
528
  *
529
  * @param WP_REST_Request $request Full details about the request.
530
+ * @return true|WP_Error
531
  */
532
  public function update_item_permissions_check( $request ) {
533
+ $retval = new WP_Error(
534
+ 'bp_rest_authorization_required',
535
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
536
+ array(
537
+ 'status' => rest_authorization_required_code(),
538
+ )
539
+ );
540
  $user_id = bp_loggedin_user_id();
541
  $group_request = $this->fetch_single_membership_request( $request['request_id'] );
542
 
548
  'status' => rest_authorization_required_code(),
549
  )
550
  );
551
+ } elseif ( ! $group_request ) {
 
 
552
  $retval = new WP_Error(
553
  'bp_rest_group_membership_requests_invalid_id',
554
  __( 'Invalid group membership request ID.', 'buddypress' ),
556
  'status' => 404,
557
  )
558
  );
559
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || groups_is_user_admin( $user_id, $group_request->item_id ) ) {
560
+ $retval = true;
561
+ } else {
 
 
562
  $retval = new WP_Error(
563
  'bp_rest_group_member_request_cannot_update_item',
564
  __( 'User is not allowed to approve membership requests to this group.', 'buddypress' ),
573
  *
574
  * @since 5.0.0
575
  *
576
+ * @param true|WP_Error $retval Whether the request can continue.
577
  * @param WP_REST_Request $request The request sent to the API.
578
  */
579
  return apply_filters( 'bp_rest_group_membership_requests_update_item_permissions_check', $retval, $request );
655
  * @since 5.0.0
656
  *
657
  * @param WP_REST_Request $request Full details about the request.
658
+ * @return true|WP_Error
659
  */
660
  public function delete_item_permissions_check( $request ) {
661
+ $retval = new WP_Error(
662
+ 'bp_rest_authorization_required',
663
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
664
+ array(
665
+ 'status' => rest_authorization_required_code(),
666
+ )
667
+ );
668
  $user_id = bp_loggedin_user_id();
669
  $group_request = $this->fetch_single_membership_request( $request['request_id'] );
670
 
676
  'status' => rest_authorization_required_code(),
677
  )
678
  );
679
+ } elseif ( ! $group_request ) {
 
 
680
  $retval = new WP_Error(
681
  'bp_rest_group_membership_requests_invalid_id',
682
  __( 'Invalid group membership request ID.', 'buddypress' ),
684
  'status' => 404,
685
  )
686
  );
687
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || $user_id === $group_request->user_id || groups_is_user_admin( $user_id, $group_request->item_id ) ) {
688
+ $retval = true;
689
+ } else {
 
 
 
690
  $retval = new WP_Error(
691
  'bp_rest_group_membership_requests_cannot_delete_item',
692
  __( 'User is not allowed to delete this membership request.', 'buddypress' ),
701
  *
702
  * @since 5.0.0
703
  *
704
+ * @param true|WP_Error $retval Whether the request may proceed.
705
  * @param WP_REST_Request $request The request sent to the API.
706
  */
707
  return apply_filters( 'bp_rest_group_membership_requests_delete_item_permissions_check', $retval, $request );
bp-groups/classes/class-bp-rest-groups-endpoint.php CHANGED
@@ -208,20 +208,19 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
208
  * @since 5.0.0
209
  *
210
  * @param WP_REST_Request $request Full details about the request.
211
- * @return bool|WP_Error
212
  */
213
  public function get_items_permissions_check( $request ) {
214
- $retval = true;
215
 
216
  /**
217
  * Filter the groups `get_items` permissions check.
218
  *
219
  * @since 5.0.0
220
  *
221
- * @param bool|WP_Error $retval Returned value.
222
  * @param WP_REST_Request $request The request sent to the API.
223
  */
224
- return apply_filters( 'bp_rest_groups_get_items_permissions_check', $retval, $request );
225
  }
226
 
227
  /**
@@ -263,10 +262,16 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
263
  * @since 5.0.0
264
  *
265
  * @param WP_REST_Request $request Full details about the request.
266
- * @return WP_Error|bool
267
  */
268
  public function get_item_permissions_check( $request ) {
269
- $retval = true;
 
 
 
 
 
 
270
  $group = $this->get_group_object( $request );
271
 
272
  if ( empty( $group->id ) ) {
@@ -277,16 +282,8 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
277
  'status' => 404,
278
  )
279
  );
280
- }
281
-
282
- if ( true === $retval && ! $this->can_see( $group ) ) {
283
- $retval = new WP_Error(
284
- 'bp_rest_authorization_required',
285
- __( 'Sorry, you cannot view the group.', 'buddypress' ),
286
- array(
287
- 'status' => rest_authorization_required_code(),
288
- )
289
- );
290
  }
291
 
292
  /**
@@ -294,7 +291,7 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
294
  *
295
  * @since 5.0.0
296
  *
297
- * @param bool|WP_Error $retval Returned value.
298
  * @param WP_REST_Request $request The request sent to the API.
299
  */
300
  return apply_filters( 'bp_rest_groups_get_item_permissions_check', $retval, $request );
@@ -376,19 +373,19 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
376
  * @since 5.0.0
377
  *
378
  * @param WP_REST_Request $request Full details about the request.
379
- * @return bool|WP_Error
380
  */
381
  public function create_item_permissions_check( $request ) {
382
- $retval = true;
 
 
 
 
 
 
383
 
384
- if ( ! ( is_user_logged_in() && bp_user_can_create_groups() ) ) {
385
- $retval = new WP_Error(
386
- 'bp_rest_authorization_required',
387
- __( 'Sorry, you are not allowed to create groups.', 'buddypress' ),
388
- array(
389
- 'status' => rest_authorization_required_code(),
390
- )
391
- );
392
  }
393
 
394
  /**
@@ -396,7 +393,7 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
396
  *
397
  * @since 5.0.0
398
  *
399
- * @param bool|WP_Error $retval Returned value.
400
  * @param WP_REST_Request $request The request sent to the API.
401
  */
402
  return apply_filters( 'bp_rest_groups_create_item_permissions_check', $retval, $request );
@@ -461,24 +458,19 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
461
  * @since 5.0.0
462
  *
463
  * @param WP_REST_Request $request Full details about the request.
464
- * @return bool|WP_Error
465
  */
466
  public function update_item_permissions_check( $request ) {
467
- $retval = true;
468
-
469
- if ( ! is_user_logged_in() ) {
470
- $retval = new WP_Error(
471
- 'bp_rest_authorization_required',
472
- __( 'Sorry, you need to be logged in to update this group.', 'buddypress' ),
473
- array(
474
- 'status' => rest_authorization_required_code(),
475
- )
476
- );
477
- }
478
-
479
- $group = $this->get_group_object( $request );
480
 
481
- if ( true === $retval && empty( $group->id ) ) {
482
  $retval = new WP_Error(
483
  'bp_rest_group_invalid_id',
484
  __( 'Invalid group ID.', 'buddypress' ),
@@ -486,17 +478,16 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
486
  'status' => 404,
487
  )
488
  );
489
- }
490
-
491
- // If group author does not match logged_in user, block update.
492
- if ( true === $retval && ! $this->can_user_delete_or_update( $group ) ) {
493
  $retval = new WP_Error(
494
  'bp_rest_authorization_required',
495
- __( 'Sorry, you are not allowed to update this group.', 'buddypress' ),
496
  array(
497
  'status' => rest_authorization_required_code(),
498
  )
499
  );
 
 
500
  }
501
 
502
  /**
@@ -504,7 +495,7 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
504
  *
505
  * @since 5.0.0
506
  *
507
- * @param bool|WP_Error $retval Returned value.
508
  * @param WP_REST_Request $request The request sent to the API.
509
  */
510
  return apply_filters( 'bp_rest_groups_update_item_permissions_check', $retval, $request );
@@ -565,24 +556,19 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
565
  * @since 5.0.0
566
  *
567
  * @param WP_REST_Request $request Full details about the request.
568
- * @return bool|WP_Error
569
  */
570
  public function delete_item_permissions_check( $request ) {
571
- $retval = true;
572
-
573
- if ( ! is_user_logged_in() ) {
574
- $retval = new WP_Error(
575
- 'bp_rest_authorization_required',
576
- __( 'Sorry, you need to be logged in to delete this group.', 'buddypress' ),
577
- array(
578
- 'status' => rest_authorization_required_code(),
579
- )
580
- );
581
- }
582
-
583
- $group = $this->get_group_object( $request );
584
 
585
- if ( true === $retval && empty( $group->id ) ) {
586
  $retval = new WP_Error(
587
  'bp_rest_group_invalid_id',
588
  __( 'Invalid group ID.', 'buddypress' ),
@@ -590,16 +576,16 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
590
  'status' => 404,
591
  )
592
  );
593
- }
594
-
595
- if ( true === $retval && ! $this->can_user_delete_or_update( $group ) ) {
596
  $retval = new WP_Error(
597
  'bp_rest_authorization_required',
598
- __( 'Sorry, you are not allowed to delete this group.', 'buddypress' ),
599
  array(
600
  'status' => rest_authorization_required_code(),
601
  )
602
  );
 
 
603
  }
604
 
605
  /**
@@ -607,7 +593,7 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
607
  *
608
  * @since 5.0.0
609
  *
610
- * @param bool|WP_Error $retval Returned value.
611
  * @param WP_REST_Request $request The request sent to the API.
612
  */
613
  return apply_filters( 'bp_rest_groups_delete_item_permissions_check', $retval, $request );
@@ -693,19 +679,19 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
693
  * @since 7.0.0
694
  *
695
  * @param WP_REST_Request $request Full details about the request.
696
- * @return bool|WP_Error
697
  */
698
  public function get_current_user_groups_permissions_check( $request ) {
699
- $retval = true;
 
 
 
 
 
 
700
 
701
- if ( ! is_user_logged_in() ) {
702
- $retval = new WP_Error(
703
- 'bp_rest_authorization_required',
704
- __( 'Sorry, you need to be logged in to view your groups.', 'buddypress' ),
705
- array(
706
- 'status' => rest_authorization_required_code(),
707
- )
708
- );
709
  }
710
 
711
  /**
@@ -713,7 +699,7 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
713
  *
714
  * @since 7.0.0
715
  *
716
- * @param bool|WP_Error $retval Returned value.
717
  * @param WP_REST_Request $request The request sent to the API.
718
  */
719
  return apply_filters( 'bp_rest_groups_get_current_user_groups_permissions_check', $retval, $request );
208
  * @since 5.0.0
209
  *
210
  * @param WP_REST_Request $request Full details about the request.
211
+ * @return true|WP_Error
212
  */
213
  public function get_items_permissions_check( $request ) {
 
214
 
215
  /**
216
  * Filter the groups `get_items` permissions check.
217
  *
218
  * @since 5.0.0
219
  *
220
+ * @param true $value True.
221
  * @param WP_REST_Request $request The request sent to the API.
222
  */
223
+ return apply_filters( 'bp_rest_groups_get_items_permissions_check', true, $request );
224
  }
225
 
226
  /**
262
  * @since 5.0.0
263
  *
264
  * @param WP_REST_Request $request Full details about the request.
265
+ * @return true|WP_Error
266
  */
267
  public function get_item_permissions_check( $request ) {
268
+ $retval = new WP_Error(
269
+ 'bp_rest_authorization_required',
270
+ __( 'Sorry, you cannot view the group.', 'buddypress' ),
271
+ array(
272
+ 'status' => rest_authorization_required_code(),
273
+ )
274
+ );
275
  $group = $this->get_group_object( $request );
276
 
277
  if ( empty( $group->id ) ) {
282
  'status' => 404,
283
  )
284
  );
285
+ } elseif ( $this->can_see( $group ) ) {
286
+ $retval = true;
 
 
 
 
 
 
 
 
287
  }
288
 
289
  /**
291
  *
292
  * @since 5.0.0
293
  *
294
+ * @param true|WP_Error $retval Returned value.
295
  * @param WP_REST_Request $request The request sent to the API.
296
  */
297
  return apply_filters( 'bp_rest_groups_get_item_permissions_check', $retval, $request );
373
  * @since 5.0.0
374
  *
375
  * @param WP_REST_Request $request Full details about the request.
376
+ * @return true|WP_Error
377
  */
378
  public function create_item_permissions_check( $request ) {
379
+ $retval = new WP_Error(
380
+ 'bp_rest_authorization_required',
381
+ __( 'Sorry, you are not allowed to create groups.', 'buddypress' ),
382
+ array(
383
+ 'status' => rest_authorization_required_code(),
384
+ )
385
+ );
386
 
387
+ if ( is_user_logged_in() && bp_user_can_create_groups() ) {
388
+ $retval = true;
 
 
 
 
 
 
389
  }
390
 
391
  /**
393
  *
394
  * @since 5.0.0
395
  *
396
+ * @param true|WP_Error $retval Returned value.
397
  * @param WP_REST_Request $request The request sent to the API.
398
  */
399
  return apply_filters( 'bp_rest_groups_create_item_permissions_check', $retval, $request );
458
  * @since 5.0.0
459
  *
460
  * @param WP_REST_Request $request Full details about the request.
461
+ * @return true|WP_Error
462
  */
463
  public function update_item_permissions_check( $request ) {
464
+ $retval = new WP_Error(
465
+ 'bp_rest_authorization_required',
466
+ __( 'Sorry, you are not allowed to update this group.', 'buddypress' ),
467
+ array(
468
+ 'status' => rest_authorization_required_code(),
469
+ )
470
+ );
471
+ $group = $this->get_group_object( $request );
 
 
 
 
 
472
 
473
+ if ( empty( $group->id ) ) {
474
  $retval = new WP_Error(
475
  'bp_rest_group_invalid_id',
476
  __( 'Invalid group ID.', 'buddypress' ),
478
  'status' => 404,
479
  )
480
  );
481
+ } elseif ( ! is_user_logged_in() ) {
 
 
 
482
  $retval = new WP_Error(
483
  'bp_rest_authorization_required',
484
+ __( 'Sorry, you need to be logged in to update this group.', 'buddypress' ),
485
  array(
486
  'status' => rest_authorization_required_code(),
487
  )
488
  );
489
+ } elseif ( $this->can_user_delete_or_update( $group ) ) {
490
+ $retval = true;
491
  }
492
 
493
  /**
495
  *
496
  * @since 5.0.0
497
  *
498
+ * @param true|WP_Error $retval Returned value.
499
  * @param WP_REST_Request $request The request sent to the API.
500
  */
501
  return apply_filters( 'bp_rest_groups_update_item_permissions_check', $retval, $request );
556
  * @since 5.0.0
557
  *
558
  * @param WP_REST_Request $request Full details about the request.
559
+ * @return true|WP_Error
560
  */
561
  public function delete_item_permissions_check( $request ) {
562
+ $retval = new WP_Error(
563
+ 'bp_rest_authorization_required',
564
+ __( 'Sorry, you are not allowed to delete this group.', 'buddypress' ),
565
+ array(
566
+ 'status' => rest_authorization_required_code(),
567
+ )
568
+ );
569
+ $group = $this->get_group_object( $request );
 
 
 
 
 
570
 
571
+ if ( empty( $group->id ) ) {
572
  $retval = new WP_Error(
573
  'bp_rest_group_invalid_id',
574
  __( 'Invalid group ID.', 'buddypress' ),
576
  'status' => 404,
577
  )
578
  );
579
+ } elseif ( ! is_user_logged_in() ) {
 
 
580
  $retval = new WP_Error(
581
  'bp_rest_authorization_required',
582
+ __( 'Sorry, you need to be logged in to delete this group.', 'buddypress' ),
583
  array(
584
  'status' => rest_authorization_required_code(),
585
  )
586
  );
587
+ } elseif ( $this->can_user_delete_or_update( $group ) ) {
588
+ $retval = true;
589
  }
590
 
591
  /**
593
  *
594
  * @since 5.0.0
595
  *
596
+ * @param true|WP_Error $retval Returned value.
597
  * @param WP_REST_Request $request The request sent to the API.
598
  */
599
  return apply_filters( 'bp_rest_groups_delete_item_permissions_check', $retval, $request );
679
  * @since 7.0.0
680
  *
681
  * @param WP_REST_Request $request Full details about the request.
682
+ * @return true|WP_Error
683
  */
684
  public function get_current_user_groups_permissions_check( $request ) {
685
+ $retval = new WP_Error(
686
+ 'bp_rest_authorization_required',
687
+ __( 'Sorry, you need to be logged in to view your groups.', 'buddypress' ),
688
+ array(
689
+ 'status' => rest_authorization_required_code(),
690
+ )
691
+ );
692
 
693
+ if ( is_user_logged_in() ) {
694
+ $retval = true;
 
 
 
 
 
 
695
  }
696
 
697
  /**
699
  *
700
  * @since 7.0.0
701
  *
702
+ * @param true|WP_Error $retval Returned value.
703
  * @param WP_REST_Request $request The request sent to the API.
704
  */
705
  return apply_filters( 'bp_rest_groups_get_current_user_groups_permissions_check', $retval, $request );
bp-loader.php CHANGED
@@ -15,7 +15,7 @@
15
  * Description: BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
16
  * Author: The BuddyPress Community
17
  * Author URI: https://buddypress.org/
18
- * Version: 7.2.0
19
  * Text Domain: buddypress
20
  * Domain Path: /bp-languages/
21
  * License: GPLv2 or later (license.txt)
15
  * Description: BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
16
  * Author: The BuddyPress Community
17
  * Author URI: https://buddypress.org/
18
+ * Version: 7.2.1
19
  * Text Domain: buddypress
20
  * Domain Path: /bp-languages/
21
  * License: GPLv2 or later (license.txt)
bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php CHANGED
@@ -157,20 +157,20 @@ class BP_REST_Attachments_Member_Avatar_Endpoint extends WP_REST_Controller {
157
  * @since 5.0.0
158
  *
159
  * @param WP_REST_Request $request Full details about the request.
160
- * @return bool|WP_Error
161
  */
162
  public function get_item_permissions_check( $request ) {
163
- $retval = true;
 
 
 
 
 
 
164
  $this->user = bp_rest_get_user( $request['user_id'] );
165
 
166
- if ( true === $retval && ! $this->user instanceof WP_User ) {
167
- $retval = new WP_Error(
168
- 'bp_rest_member_invalid_id',
169
- __( 'Invalid member ID.', 'buddypress' ),
170
- array(
171
- 'status' => 404,
172
- )
173
- );
174
  }
175
 
176
  /**
@@ -178,7 +178,7 @@ class BP_REST_Attachments_Member_Avatar_Endpoint extends WP_REST_Controller {
178
  *
179
  * @since 5.0.0
180
  *
181
- * @param bool|WP_Error $retval Returned value.
182
  * @param WP_REST_Request $request The request sent to the API.
183
  */
184
  return apply_filters( 'bp_rest_attachments_member_avatar_get_item_permissions_check', $retval, $request );
@@ -242,47 +242,51 @@ class BP_REST_Attachments_Member_Avatar_Endpoint extends WP_REST_Controller {
242
  * @since 5.0.0
243
  *
244
  * @param WP_REST_Request $request Full details about the request.
245
- * @return bool|WP_Error
246
  */
247
  public function create_item_permissions_check( $request ) {
248
  $retval = $this->get_item_permissions_check( $request );
249
- $args = array();
250
-
251
- if ( isset( $this->user->ID ) ) {
252
- $args = array(
253
- 'item_id' => (int) $this->user->ID,
254
- 'object' => 'user',
255
- );
256
- }
257
 
258
- if ( true === $retval && ! is_user_logged_in() ) {
259
- $retval = new WP_Error(
 
260
  'bp_rest_authorization_required',
261
- __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
262
  array(
263
  'status' => rest_authorization_required_code(),
264
  )
265
  );
266
- }
267
 
268
- if ( true === $retval && 'POST' === $request->get_method() && bp_disable_avatar_uploads() ) {
269
- $retval = new WP_Error(
270
- 'bp_rest_attachments_member_avatar_disabled',
271
- __( 'Sorry, member avatar upload is disabled.', 'buddypress' ),
272
- array(
273
- 'status' => 500,
274
- )
275
- );
276
- }
277
-
278
- if ( true === $retval && ! empty( $args ) && ! bp_attachments_current_user_can( 'edit_avatar', $args ) ) {
279
- $retval = new WP_Error(
280
- 'bp_rest_authorization_required',
281
- __( 'Sorry, you are not authorized to perform this action.', 'buddypress' ),
282
- array(
283
- 'status' => rest_authorization_required_code(),
284
- )
285
- );
 
 
 
 
 
 
 
 
 
 
 
 
286
  }
287
 
288
  /**
@@ -290,7 +294,7 @@ class BP_REST_Attachments_Member_Avatar_Endpoint extends WP_REST_Controller {
290
  *
291
  * @since 5.0.0
292
  *
293
- * @param bool|WP_Error $retval Returned value.
294
  * @param WP_REST_Request $request The request sent to the API.
295
  */
296
  return apply_filters( 'bp_rest_attachments_member_avatar_create_item_permissions_check', $retval, $request );
@@ -379,7 +383,7 @@ class BP_REST_Attachments_Member_Avatar_Endpoint extends WP_REST_Controller {
379
  * @since 5.0.0
380
  *
381
  * @param WP_REST_Request $request Full details about the request.
382
- * @return bool|WP_Error
383
  */
384
  public function delete_item_permissions_check( $request ) {
385
  $retval = $this->create_item_permissions_check( $request );
@@ -389,7 +393,7 @@ class BP_REST_Attachments_Member_Avatar_Endpoint extends WP_REST_Controller {
389
  *
390
  * @since 5.0.0
391
  *
392
- * @param bool|WP_Error $retval Returned value.
393
  * @param WP_REST_Request $request The request sent to the API.
394
  */
395
  return apply_filters( 'bp_rest_attachments_member_avatar_delete_item_permissions_check', $retval, $request );
157
  * @since 5.0.0
158
  *
159
  * @param WP_REST_Request $request Full details about the request.
160
+ * @return true|WP_Error
161
  */
162
  public function get_item_permissions_check( $request ) {
163
+ $retval = new WP_Error(
164
+ 'bp_rest_member_invalid_id',
165
+ __( 'Invalid member ID.', 'buddypress' ),
166
+ array(
167
+ 'status' => 404,
168
+ )
169
+ );
170
  $this->user = bp_rest_get_user( $request['user_id'] );
171
 
172
+ if ( $this->user instanceof WP_User ) {
173
+ $retval = true;
 
 
 
 
 
 
174
  }
175
 
176
  /**
178
  *
179
  * @since 5.0.0
180
  *
181
+ * @param true|WP_Error $retval Returned value.
182
  * @param WP_REST_Request $request The request sent to the API.
183
  */
184
  return apply_filters( 'bp_rest_attachments_member_avatar_get_item_permissions_check', $retval, $request );
242
  * @since 5.0.0
243
  *
244
  * @param WP_REST_Request $request Full details about the request.
245
+ * @return true|WP_Error
246
  */
247
  public function create_item_permissions_check( $request ) {
248
  $retval = $this->get_item_permissions_check( $request );
 
 
 
 
 
 
 
 
249
 
250
+ if ( ! is_wp_error( $retval ) ) {
251
+ $args = array();
252
+ $error = new WP_Error(
253
  'bp_rest_authorization_required',
254
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
255
  array(
256
  'status' => rest_authorization_required_code(),
257
  )
258
  );
 
259
 
260
+ if ( ! isset( $this->user->ID ) || ! isset( $this->object ) ) {
261
+ $retval = $error;
262
+ } else {
263
+ $args = array(
264
+ 'item_id' => $this->user->ID,
265
+ 'object' => $this->object,
266
+ );
267
+
268
+ if ( ! is_user_logged_in() ) {
269
+ $retval = new WP_Error(
270
+ 'bp_rest_authorization_required',
271
+ __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
272
+ array(
273
+ 'status' => rest_authorization_required_code(),
274
+ )
275
+ );
276
+ } elseif ( 'POST' === $request->get_method() && bp_disable_avatar_uploads() ) {
277
+ $retval = new WP_Error(
278
+ 'bp_rest_attachments_member_avatar_disabled',
279
+ __( 'Sorry, member avatar upload is disabled.', 'buddypress' ),
280
+ array(
281
+ 'status' => 500,
282
+ )
283
+ );
284
+ } elseif ( bp_attachments_current_user_can( 'edit_avatar', $args ) ) {
285
+ $retval = true;
286
+ } else {
287
+ $retval = $error;
288
+ }
289
+ }
290
  }
291
 
292
  /**
294
  *
295
  * @since 5.0.0
296
  *
297
+ * @param true|WP_Error $retval Returned value.
298
  * @param WP_REST_Request $request The request sent to the API.
299
  */
300
  return apply_filters( 'bp_rest_attachments_member_avatar_create_item_permissions_check', $retval, $request );
383
  * @since 5.0.0
384
  *
385
  * @param WP_REST_Request $request Full details about the request.
386
+ * @return true|WP_Error
387
  */
388
  public function delete_item_permissions_check( $request ) {
389
  $retval = $this->create_item_permissions_check( $request );
393
  *
394
  * @since 5.0.0
395
  *
396
+ * @param true|WP_Error $retval Returned value.
397
  * @param WP_REST_Request $request The request sent to the API.
398
  */
399
  return apply_filters( 'bp_rest_attachments_member_avatar_delete_item_permissions_check', $retval, $request );
bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php CHANGED
@@ -147,20 +147,20 @@ class BP_REST_Attachments_Member_Cover_Endpoint extends WP_REST_Controller {
147
  * @since 6.0.0
148
  *
149
  * @param WP_REST_Request $request Full details about the request.
150
- * @return bool|WP_Error
151
  */
152
  public function get_item_permissions_check( $request ) {
153
- $retval = true;
 
 
 
 
 
 
154
  $this->user = bp_rest_get_user( $request['user_id'] );
155
 
156
- if ( ! $this->user instanceof WP_User ) {
157
- $retval = new WP_Error(
158
- 'bp_rest_member_invalid_id',
159
- __( 'Invalid member ID.', 'buddypress' ),
160
- array(
161
- 'status' => 404,
162
- )
163
- );
164
  }
165
 
166
  /**
@@ -168,7 +168,7 @@ class BP_REST_Attachments_Member_Cover_Endpoint extends WP_REST_Controller {
168
  *
169
  * @since 6.0.0
170
  *
171
- * @param bool|WP_Error $retval Returned value.
172
  * @param WP_REST_Request $request The request sent to the API.
173
  */
174
  return apply_filters( 'bp_rest_attachments_member_cover_get_item_permissions_check', $retval, $request );
@@ -232,7 +232,7 @@ class BP_REST_Attachments_Member_Cover_Endpoint extends WP_REST_Controller {
232
  * @since 6.0.0
233
  *
234
  * @param WP_REST_Request $request Full details about the request.
235
- * @return bool|WP_Error
236
  */
237
  public function create_item_permissions_check( $request ) {
238
  $retval = $this->delete_item_permissions_check( $request );
@@ -252,7 +252,7 @@ class BP_REST_Attachments_Member_Cover_Endpoint extends WP_REST_Controller {
252
  *
253
  * @since 6.0.0
254
  *
255
- * @param bool|WP_Error $retval Returned value.
256
  * @param WP_REST_Request $request The request sent to the API.
257
  */
258
  return apply_filters( 'bp_rest_attachments_member_cover_create_item_permissions_check', $retval, $request );
@@ -321,37 +321,43 @@ class BP_REST_Attachments_Member_Cover_Endpoint extends WP_REST_Controller {
321
  * @since 6.0.0
322
  *
323
  * @param WP_REST_Request $request Full details about the request.
324
- * @return bool|WP_Error
325
  */
326
  public function delete_item_permissions_check( $request ) {
327
  $retval = $this->get_item_permissions_check( $request );
328
- $args = array();
329
 
330
- if ( isset( $this->user->ID ) ) {
331
- $args = array(
332
- 'item_id' => $this->user->ID,
333
- 'object' => $this->object,
334
- );
335
- }
336
-
337
- if ( true === $retval && ! is_user_logged_in() ) {
338
- $retval = new WP_Error(
339
  'bp_rest_authorization_required',
340
- __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
341
  array(
342
  'status' => rest_authorization_required_code(),
343
  )
344
  );
345
- }
346
 
347
- if ( true === $retval && ! empty( $args ) && ! bp_attachments_current_user_can( 'edit_cover_image', $args ) ) {
348
- $retval = new WP_Error(
349
- 'bp_rest_authorization_required',
350
- __( 'Sorry, you are not authorized to perform this action.', 'buddypress' ),
351
- array(
352
- 'status' => rest_authorization_required_code(),
353
- )
354
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  }
356
 
357
  /**
@@ -359,7 +365,7 @@ class BP_REST_Attachments_Member_Cover_Endpoint extends WP_REST_Controller {
359
  *
360
  * @since 6.0.0
361
  *
362
- * @param bool|WP_Error $retval Returned value.
363
  * @param WP_REST_Request $request The request sent to the API.
364
  */
365
  return apply_filters( 'bp_rest_attachments_member_cover_delete_item_permissions_check', $retval, $request );
147
  * @since 6.0.0
148
  *
149
  * @param WP_REST_Request $request Full details about the request.
150
+ * @return true|WP_Error
151
  */
152
  public function get_item_permissions_check( $request ) {
153
+ $retval = new WP_Error(
154
+ 'bp_rest_member_invalid_id',
155
+ __( 'Invalid member ID.', 'buddypress' ),
156
+ array(
157
+ 'status' => 404,
158
+ )
159
+ );
160
  $this->user = bp_rest_get_user( $request['user_id'] );
161
 
162
+ if ( $this->user instanceof WP_User ) {
163
+ $retval = true;
 
 
 
 
 
 
164
  }
165
 
166
  /**
168
  *
169
  * @since 6.0.0
170
  *
171
+ * @param true|WP_Error $retval Returned value.
172
  * @param WP_REST_Request $request The request sent to the API.
173
  */
174
  return apply_filters( 'bp_rest_attachments_member_cover_get_item_permissions_check', $retval, $request );
232
  * @since 6.0.0
233
  *
234
  * @param WP_REST_Request $request Full details about the request.
235
+ * @return true|WP_Error
236
  */
237
  public function create_item_permissions_check( $request ) {
238
  $retval = $this->delete_item_permissions_check( $request );
252
  *
253
  * @since 6.0.0
254
  *
255
+ * @param true|WP_Error $retval Returned value.
256
  * @param WP_REST_Request $request The request sent to the API.
257
  */
258
  return apply_filters( 'bp_rest_attachments_member_cover_create_item_permissions_check', $retval, $request );
321
  * @since 6.0.0
322
  *
323
  * @param WP_REST_Request $request Full details about the request.
324
+ * @return true|WP_Error
325
  */
326
  public function delete_item_permissions_check( $request ) {
327
  $retval = $this->get_item_permissions_check( $request );
 
328
 
329
+ if ( ! is_wp_error( $retval ) ) {
330
+ $args = array();
331
+ $error = new WP_Error(
 
 
 
 
 
 
332
  'bp_rest_authorization_required',
333
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
334
  array(
335
  'status' => rest_authorization_required_code(),
336
  )
337
  );
 
338
 
339
+ if ( ! isset( $this->user->ID ) || ! isset( $this->object ) ) {
340
+ $retval = $error;
341
+ } else {
342
+ $args = array(
343
+ 'item_id' => $this->user->ID,
344
+ 'object' => $this->object,
345
+ );
346
+
347
+ if ( ! is_user_logged_in() ) {
348
+ $retval = new WP_Error(
349
+ 'bp_rest_authorization_required',
350
+ __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
351
+ array(
352
+ 'status' => rest_authorization_required_code(),
353
+ )
354
+ );
355
+ } elseif ( bp_attachments_current_user_can( 'edit_cover_image', $args ) ) {
356
+ $retval = true;
357
+ } else {
358
+ $retval = $error;
359
+ }
360
+ }
361
  }
362
 
363
  /**
365
  *
366
  * @since 6.0.0
367
  *
368
+ * @param true|WP_Error $retval Returned value.
369
  * @param WP_REST_Request $request The request sent to the API.
370
  */
371
  return apply_filters( 'bp_rest_attachments_member_cover_delete_item_permissions_check', $retval, $request );
bp-members/classes/class-bp-rest-members-endpoint.php CHANGED
@@ -178,7 +178,7 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
178
  * @since 5.0.0
179
  *
180
  * @param WP_REST_Request $request Full details about the request.
181
- * @return bool
182
  */
183
  public function get_items_permissions_check( $request ) {
184
 
@@ -187,7 +187,7 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
187
  *
188
  * @since 5.0.0
189
  *
190
- * @param bool $retval Returned value.
191
  * @param WP_REST_Request $request The request sent to the API.
192
  */
193
  return apply_filters( 'bp_rest_members_get_items_permissions_check', true, $request );
@@ -227,10 +227,16 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
227
  * @since 5.0.0
228
  *
229
  * @param WP_REST_Request $request Full details about the request.
230
- * @return bool|WP_Error
231
  */
232
  public function get_item_permissions_check( $request ) {
233
- $retval = true;
 
 
 
 
 
 
234
  $user = bp_rest_get_user( $request['id'] );
235
 
236
  if ( ! $user instanceof WP_User ) {
@@ -241,18 +247,20 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
241
  'status' => 404,
242
  )
243
  );
244
- }
245
-
246
- if ( true === $retval && get_current_user_id() === $user->ID ) {
 
 
 
 
 
 
 
 
 
 
247
  $retval = true;
248
- } elseif ( true === $retval && 'edit' === $request['context'] && ! current_user_can( 'list_users' ) ) {
249
- $retval = new WP_Error(
250
- 'bp_rest_authorization_required',
251
- __( 'Sorry, you are not allowed to view members with the edit context.', 'buddypress' ),
252
- array(
253
- 'status' => rest_authorization_required_code(),
254
- )
255
- );
256
  }
257
 
258
  /**
@@ -260,7 +268,7 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
260
  *
261
  * @since 5.0.0
262
  *
263
- * @param bool|WP_Error $retval Returned value.
264
  * @param WP_REST_Request $request The request sent to the API.
265
  */
266
  return apply_filters( 'bp_rest_members_get_item_permissions_check', $retval, $request );
@@ -272,27 +280,17 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
272
  * @since 5.0.0
273
  *
274
  * @param WP_REST_Request $request Full details about the request.
275
- * @return bool|WP_Error
276
  */
277
  public function create_item_permissions_check( $request ) {
278
- $retval = true;
279
-
280
- if ( ! ( is_user_logged_in() && current_user_can( 'bp_moderate' ) ) ) {
281
- $retval = new WP_Error(
282
- 'bp_rest_authorization_required',
283
- __( 'Sorry, you are not allowed to view members.', 'buddypress' ),
284
- array(
285
- 'status' => rest_authorization_required_code(),
286
- )
287
- );
288
- }
289
 
290
  /**
291
  * Filter or override the members `create_item` permissions check.
292
  *
293
  * @since 5.0.0
294
  *
295
- * @param bool|WP_Error $retval Returned value.
296
  * @param WP_REST_Request $request The request sent to the API.
297
  */
298
  return apply_filters( 'bp_rest_members_create_item_permissions_check', $retval, $request );
@@ -304,11 +302,20 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
304
  * @since 5.0.0
305
  *
306
  * @param WP_REST_Request $request Full details about the request.
307
- * @return bool|WP_Error
308
  */
309
  public function update_item_permissions_check( $request ) {
310
- $retval = true;
311
- $user = bp_rest_get_user( $request['id'] );
 
 
 
 
 
 
 
 
 
312
 
313
  if ( ! $user instanceof WP_User ) {
314
  $retval = new WP_Error(
@@ -318,21 +325,30 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
318
  'status' => 404,
319
  )
320
  );
321
- }
 
322
 
323
- $action = 'delete';
324
- if ( 'DELETE' !== $request->get_method() ) {
325
- $action = 'update';
326
- }
327
 
328
- if ( true === $retval && ! $this->can_manage_member( $user, $action ) ) {
329
- $retval = new WP_Error(
330
- 'bp_rest_authorization_required',
331
- __( 'Sorry, you are not allowed to view members.', 'buddypress' ),
332
- array(
333
- 'status' => rest_authorization_required_code(),
334
- )
335
- );
 
 
 
 
 
 
 
 
 
336
  }
337
 
338
  /**
@@ -340,7 +356,7 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
340
  *
341
  * @since 5.0.0
342
  *
343
- * @param bool|WP_Error $retval Returned value.
344
  * @param WP_REST_Request $request The request sent to the API.
345
  */
346
  return apply_filters( 'bp_rest_members_update_item_permissions_check', $retval, $request );
@@ -352,7 +368,7 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
352
  * @since 5.0.0
353
  *
354
  * @param WP_REST_Request $request Full details about the request.
355
- * @return bool|WP_Error
356
  */
357
  public function delete_item_permissions_check( $request ) {
358
  $retval = $this->update_item_permissions_check( $request );
@@ -362,7 +378,7 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
362
  *
363
  * @since 5.0.0
364
  *
365
- * @param bool|WP_Error $retval Returned value.
366
  * @param WP_REST_Request $request The request sent to the API.
367
  */
368
  return apply_filters( 'bp_rest_members_delete_item_permissions_check', $retval, $request );
@@ -675,7 +691,7 @@ class BP_REST_Members_Endpoint extends WP_REST_Users_Controller {
675
  $capability = 'edit_user';
676
  }
677
 
678
- return ( current_user_can( 'bp_moderate' ) || current_user_can( $capability, $user->ID ) );
679
  }
680
 
681
  /**
178
  * @since 5.0.0
179
  *
180
  * @param WP_REST_Request $request Full details about the request.
181
+ * @return true
182
  */
183
  public function get_items_permissions_check( $request ) {
184
 
187
  *
188
  * @since 5.0.0
189
  *
190
+ * @param true $retval Returned value.
191
  * @param WP_REST_Request $request The request sent to the API.
192
  */
193
  return apply_filters( 'bp_rest_members_get_items_permissions_check', true, $request );
227
  * @since 5.0.0
228
  *
229
  * @param WP_REST_Request $request Full details about the request.
230
+ * @return true|WP_Error
231
  */
232
  public function get_item_permissions_check( $request ) {
233
+ $retval = new WP_Error(
234
+ 'bp_rest_authorization_required',
235
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
236
+ array(
237
+ 'status' => rest_authorization_required_code(),
238
+ )
239
+ );
240
  $user = bp_rest_get_user( $request['id'] );
241
 
242
  if ( ! $user instanceof WP_User ) {
247
  'status' => 404,
248
  )
249
  );
250
+ } elseif ( 'edit' === $request['context'] ) {
251
+ if ( get_current_user_id() === $user->ID || bp_current_user_can( 'list_users' ) ) {
252
+ $retval = true;
253
+ } else {
254
+ $retval = new WP_Error(
255
+ 'bp_rest_authorization_required',
256
+ __( 'Sorry, you are not allowed to view members with the edit context.', 'buddypress' ),
257
+ array(
258
+ 'status' => rest_authorization_required_code(),
259
+ )
260
+ );
261
+ }
262
+ } else {
263
  $retval = true;
 
 
 
 
 
 
 
 
264
  }
265
 
266
  /**
268
  *
269
  * @since 5.0.0
270
  *
271
+ * @param true|WP_Error $retval Returned value.
272
  * @param WP_REST_Request $request The request sent to the API.
273
  */
274
  return apply_filters( 'bp_rest_members_get_item_permissions_check', $retval, $request );
280
  * @since 5.0.0
281
  *
282
  * @param WP_REST_Request $request Full details about the request.
283
+ * @return true|WP_Error
284
  */
285
  public function create_item_permissions_check( $request ) {
286
+ $retval = parent::create_item_permissions_check( $request );
 
 
 
 
 
 
 
 
 
 
287
 
288
  /**
289
  * Filter or override the members `create_item` permissions check.
290
  *
291
  * @since 5.0.0
292
  *
293
+ * @param true|WP_Error $retval Returned value.
294
  * @param WP_REST_Request $request The request sent to the API.
295
  */
296
  return apply_filters( 'bp_rest_members_create_item_permissions_check', $retval, $request );
302
  * @since 5.0.0
303
  *
304
  * @param WP_REST_Request $request Full details about the request.
305
+ * @return true|WP_Error
306
  */
307
  public function update_item_permissions_check( $request ) {
308
+ $error = new WP_Error(
309
+ 'bp_rest_authorization_required',
310
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
311
+ array(
312
+ 'status' => rest_authorization_required_code(),
313
+ )
314
+ );
315
+ $retval = $error;
316
+
317
+ $user = bp_rest_get_user( $request['id'] );
318
+ $member_type_edit = isset( $request['member_type'] );
319
 
320
  if ( ! $user instanceof WP_User ) {
321
  $retval = new WP_Error(
325
  'status' => 404,
326
  )
327
  );
328
+ } else {
329
+ $action = 'delete';
330
 
331
+ if ( 'DELETE' !== $request->get_method() ) {
332
+ $action = 'update';
333
+ }
 
334
 
335
+ if ( get_current_user_id() === $user->ID ) {
336
+ if ( $member_type_edit && ! bp_current_user_can( 'bp_moderate' ) ) {
337
+ $retval = $error;
338
+ } else {
339
+ $retval = parent::update_item_permissions_check( $request );
340
+ }
341
+ } elseif ( ! $this->can_manage_member( $user, $action ) ) {
342
+ $retval = new WP_Error(
343
+ 'bp_rest_authorization_required',
344
+ __( 'Sorry, you are not allowed to view members.', 'buddypress' ),
345
+ array(
346
+ 'status' => rest_authorization_required_code(),
347
+ )
348
+ );
349
+ } else {
350
+ $retval = true;
351
+ }
352
  }
353
 
354
  /**
356
  *
357
  * @since 5.0.0
358
  *
359
+ * @param true|WP_Error $retval Returned value.
360
  * @param WP_REST_Request $request The request sent to the API.
361
  */
362
  return apply_filters( 'bp_rest_members_update_item_permissions_check', $retval, $request );
368
  * @since 5.0.0
369
  *
370
  * @param WP_REST_Request $request Full details about the request.
371
+ * @return true|WP_Error
372
  */
373
  public function delete_item_permissions_check( $request ) {
374
  $retval = $this->update_item_permissions_check( $request );
378
  *
379
  * @since 5.0.0
380
  *
381
+ * @param true|WP_Error $retval Returned value.
382
  * @param WP_REST_Request $request The request sent to the API.
383
  */
384
  return apply_filters( 'bp_rest_members_delete_item_permissions_check', $retval, $request );
691
  $capability = 'edit_user';
692
  }
693
 
694
+ return current_user_can( $capability, $user->ID );
695
  }
696
 
697
  /**
bp-members/classes/class-bp-rest-signup-endpoint.php CHANGED
@@ -179,29 +179,35 @@ class BP_REST_Signup_Endpoint extends WP_REST_Controller {
179
  * @since 6.0.0
180
  *
181
  * @param WP_REST_Request $request Full data about the request.
182
- * @return bool|WP_Error
183
  */
184
  public function get_items_permissions_check( $request ) {
185
- $retval = true;
 
 
 
 
 
 
 
186
 
187
- if ( ! is_user_logged_in() ) {
188
- $retval = new WP_Error(
189
- 'bp_rest_authorization_required',
190
- __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
191
- array(
192
- 'status' => rest_authorization_required_code(),
193
- )
194
- );
195
  }
196
 
197
- if ( true === $retval && ! bp_current_user_can( 'bp_moderate' ) ) {
198
  $retval = new WP_Error(
199
  'bp_rest_authorization_required',
200
- __( 'Sorry, you are not authorized to perform this action.', 'buddypress' ),
201
  array(
202
  'status' => rest_authorization_required_code(),
203
  )
204
  );
 
 
 
 
205
  }
206
 
207
  /**
@@ -209,7 +215,7 @@ class BP_REST_Signup_Endpoint extends WP_REST_Controller {
209
  *
210
  * @since 6.0.0
211
  *
212
- * @param bool|WP_Error $retval Returned value.
213
  * @param WP_REST_Request $request The request sent to the API.
214
  */
215
  return apply_filters( 'bp_rest_signup_get_items_permissions_check', $retval, $request );
@@ -255,40 +261,23 @@ class BP_REST_Signup_Endpoint extends WP_REST_Controller {
255
  * @since 6.0.0
256
  *
257
  * @param WP_REST_Request $request Full data about the request.
258
- * @return WP_Error|bool
259
  */
260
  public function get_item_permissions_check( $request ) {
261
- $retval = true;
262
- $signup = $this->get_signup_object( $request['id'] );
263
-
264
- if ( ! is_user_logged_in() ) {
265
- $retval = new WP_Error(
266
- 'bp_rest_authorization_required',
267
- __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
268
- array(
269
- 'status' => rest_authorization_required_code(),
270
- )
271
- );
272
- }
273
-
274
- if ( true === $retval && empty( $signup ) ) {
275
- $retval = new WP_Error(
276
- 'bp_rest_invalid_id',
277
- __( 'Invalid signup id.', 'buddypress' ),
278
- array(
279
- 'status' => 404,
280
- )
281
- );
282
- }
283
-
284
- if ( true === $retval && ! bp_current_user_can( 'bp_moderate' ) ) {
285
- $retval = new WP_Error(
286
- 'bp_rest_authorization_required',
287
- __( 'Sorry, you are not authorized to perform this action.', 'buddypress' ),
288
- array(
289
- 'status' => rest_authorization_required_code(),
290
- )
291
- );
292
  }
293
 
294
  /**
@@ -296,7 +285,7 @@ class BP_REST_Signup_Endpoint extends WP_REST_Controller {
296
  *
297
  * @since 6.0.0
298
  *
299
- * @param bool|WP_Error $retval Returned value.
300
  * @param WP_REST_Request $request The request sent to the API.
301
  */
302
  return apply_filters( 'bp_rest_signup_get_item_permissions_check', $retval, $request );
@@ -506,21 +495,19 @@ class BP_REST_Signup_Endpoint extends WP_REST_Controller {
506
  * @since 6.0.0
507
  *
508
  * @param WP_REST_Request $request Full details about the request.
509
- * @return bool|WP_Error
510
  */
511
  public function create_item_permissions_check( $request ) {
512
- // The purpose of a signup is to allow a new user to register to the site.
513
- $retval = true;
514
 
515
  /**
516
  * Filter the signup `create_item` permissions check.
517
  *
518
  * @since 6.0.0
519
  *
520
- * @param bool|WP_Error $retval Returned value.
521
  * @param WP_REST_Request $request The request sent to the API.
522
  */
523
- return apply_filters( 'bp_rest_signup_create_item_permissions_check', $retval, $request );
524
  }
525
 
526
  /**
@@ -578,7 +565,7 @@ class BP_REST_Signup_Endpoint extends WP_REST_Controller {
578
  * @since 6.0.0
579
  *
580
  * @param WP_REST_Request $request Full details about the request.
581
- * @return bool|WP_Error
582
  */
583
  public function delete_item_permissions_check( $request ) {
584
  $retval = $this->get_item_permissions_check( $request );
@@ -588,7 +575,7 @@ class BP_REST_Signup_Endpoint extends WP_REST_Controller {
588
  *
589
  * @since 6.0.0
590
  *
591
- * @param bool|WP_Error $retval Returned value.
592
  * @param WP_REST_Request $request The request sent to the API.
593
  */
594
  return apply_filters( 'bp_rest_signup_delete_item_permissions_check', $retval, $request );
@@ -650,24 +637,23 @@ class BP_REST_Signup_Endpoint extends WP_REST_Controller {
650
  * @since 6.0.0
651
  *
652
  * @param WP_REST_Request $request Full details about the request.
653
- * @return bool|WP_Error
654
  */
655
  public function activate_item_permissions_check( $request ) {
656
- $retval = true;
 
 
 
 
 
 
 
657
  // Get the activation key.
658
  $activation_key = $request->get_param( 'activation_key' );
659
 
660
- // Get the signup thanks to the activation key.
661
- $signup = $this->get_signup_object( $activation_key );
662
-
663
- if ( empty( $signup ) ) {
664
- $retval = new WP_Error(
665
- 'bp_rest_invalid_activation_key',
666
- __( 'Invalid activation key.', 'buddypress' ),
667
- array(
668
- 'status' => 404,
669
- )
670
- );
671
  }
672
 
673
  /**
@@ -675,7 +661,7 @@ class BP_REST_Signup_Endpoint extends WP_REST_Controller {
675
  *
676
  * @since 6.0.0
677
  *
678
- * @param bool|WP_Error $retval Returned value.
679
  * @param WP_REST_Request $request The request sent to the API.
680
  */
681
  return apply_filters( 'bp_rest_signup_activate_item_permissions_check', $retval, $request );
179
  * @since 6.0.0
180
  *
181
  * @param WP_REST_Request $request Full data about the request.
182
+ * @return true|WP_Error
183
  */
184
  public function get_items_permissions_check( $request ) {
185
+ $error = new WP_Error(
186
+ 'bp_rest_authorization_required',
187
+ __( 'Sorry, you are not authorized to perform this action.', 'buddypress' ),
188
+ array(
189
+ 'status' => rest_authorization_required_code(),
190
+ )
191
+ );
192
+ $retval = $error;
193
 
194
+ $capability = 'edit_users';
195
+ if ( is_multisite() ) {
196
+ $capability = 'manage_network_users';
 
 
 
 
 
197
  }
198
 
199
+ if ( ! is_user_logged_in() ) {
200
  $retval = new WP_Error(
201
  'bp_rest_authorization_required',
202
+ __( 'Sorry, you need to be logged in to perform this action.', 'buddypress' ),
203
  array(
204
  'status' => rest_authorization_required_code(),
205
  )
206
  );
207
+ } elseif ( bp_current_user_can( $capability ) ) {
208
+ $retval = true;
209
+ } else {
210
+ $retval = $error;
211
  }
212
 
213
  /**
215
  *
216
  * @since 6.0.0
217
  *
218
+ * @param true|WP_Error $retval Returned value.
219
  * @param WP_REST_Request $request The request sent to the API.
220
  */
221
  return apply_filters( 'bp_rest_signup_get_items_permissions_check', $retval, $request );
261
  * @since 6.0.0
262
  *
263
  * @param WP_REST_Request $request Full data about the request.
264
+ * @return true|WP_Error
265
  */
266
  public function get_item_permissions_check( $request ) {
267
+ $retval = $this->get_items_permissions_check( $request );
268
+
269
+ if ( ! is_wp_error( $retval ) ) {
270
+ $signup = $this->get_signup_object( $request['id'] );
271
+
272
+ if ( empty( $signup ) ) {
273
+ $retval = new WP_Error(
274
+ 'bp_rest_invalid_id',
275
+ __( 'Invalid signup id.', 'buddypress' ),
276
+ array(
277
+ 'status' => 404,
278
+ )
279
+ );
280
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  }
282
 
283
  /**
285
  *
286
  * @since 6.0.0
287
  *
288
+ * @param true|WP_Error $retval Returned value.
289
  * @param WP_REST_Request $request The request sent to the API.
290
  */
291
  return apply_filters( 'bp_rest_signup_get_item_permissions_check', $retval, $request );
495
  * @since 6.0.0
496
  *
497
  * @param WP_REST_Request $request Full details about the request.
498
+ * @return true
499
  */
500
  public function create_item_permissions_check( $request ) {
 
 
501
 
502
  /**
503
  * Filter the signup `create_item` permissions check.
504
  *
505
  * @since 6.0.0
506
  *
507
+ * @param true $value Returned value.
508
  * @param WP_REST_Request $request The request sent to the API.
509
  */
510
+ return apply_filters( 'bp_rest_signup_create_item_permissions_check', true, $request );
511
  }
512
 
513
  /**
565
  * @since 6.0.0
566
  *
567
  * @param WP_REST_Request $request Full details about the request.
568
+ * @return true|WP_Error
569
  */
570
  public function delete_item_permissions_check( $request ) {
571
  $retval = $this->get_item_permissions_check( $request );
575
  *
576
  * @since 6.0.0
577
  *
578
+ * @param true|WP_Error $retval Returned value.
579
  * @param WP_REST_Request $request The request sent to the API.
580
  */
581
  return apply_filters( 'bp_rest_signup_delete_item_permissions_check', $retval, $request );
637
  * @since 6.0.0
638
  *
639
  * @param WP_REST_Request $request Full details about the request.
640
+ * @return true|WP_Error
641
  */
642
  public function activate_item_permissions_check( $request ) {
643
+ $retval = new WP_Error(
644
+ 'bp_rest_invalid_activation_key',
645
+ __( 'Invalid activation key.', 'buddypress' ),
646
+ array(
647
+ 'status' => 404,
648
+ )
649
+ );
650
+
651
  // Get the activation key.
652
  $activation_key = $request->get_param( 'activation_key' );
653
 
654
+ // Check the activation key is valid.
655
+ if ( $this->get_signup_object( $activation_key ) ) {
656
+ $retval = true;
 
 
 
 
 
 
 
 
657
  }
658
 
659
  /**
661
  *
662
  * @since 6.0.0
663
  *
664
+ * @param true|WP_Error $retval Returned value.
665
  * @param WP_REST_Request $request The request sent to the API.
666
  */
667
  return apply_filters( 'bp_rest_signup_activate_item_permissions_check', $retval, $request );
bp-messages/classes/class-bp-rest-messages-endpoint.php CHANGED
@@ -177,41 +177,39 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
177
  * @since 5.0.0
178
  *
179
  * @param WP_REST_Request $request Full data about the request.
180
- * @return WP_Error|bool
181
  */
182
  public function get_items_permissions_check( $request ) {
183
- $retval = true;
184
-
185
- if ( ! is_user_logged_in() ) {
186
- $retval = new WP_Error(
187
- 'bp_rest_authorization_required',
188
- __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
189
- array(
190
- 'status' => rest_authorization_required_code(),
191
- )
192
- );
193
- }
194
-
195
- $user = bp_rest_get_user( $request['user_id'] );
196
 
197
- if ( true === $retval && ! $user instanceof WP_User ) {
198
- $retval = new WP_Error(
199
- 'bp_rest_invalid_id',
200
- __( 'Invalid member ID.', 'buddypress' ),
201
- array(
202
- 'status' => 404,
203
- )
204
- );
205
- }
206
 
207
- if ( true === $retval && (int) bp_loggedin_user_id() !== $user->ID && ! bp_current_user_can( 'bp_moderate' ) ) {
208
- $retval = new WP_Error(
209
- 'bp_rest_authorization_required',
210
- __( 'Sorry, you cannot view the messages.', 'buddypress' ),
211
- array(
212
- 'status' => rest_authorization_required_code(),
213
- )
214
- );
 
 
 
 
 
 
 
 
 
 
 
215
  }
216
 
217
  /**
@@ -219,7 +217,7 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
219
  *
220
  * @since 5.0.0
221
  *
222
- * @param bool|WP_Error $retval Returned value.
223
  * @param WP_REST_Request $request The request sent to the API.
224
  */
225
  return apply_filters( 'bp_rest_messages_get_items_permissions_check', $retval, $request );
@@ -264,49 +262,33 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
264
  * @since 5.0.0
265
  *
266
  * @param WP_REST_Request $request Full data about the request.
267
- * @return WP_Error|bool
268
  */
269
  public function get_item_permissions_check( $request ) {
270
- $retval = true;
271
-
272
- if ( ! is_user_logged_in() ) {
273
- $retval = new WP_Error(
274
- 'bp_rest_authorization_required',
275
- __( 'Sorry, you are not allowed to see this thread.', 'buddypress' ),
276
- array(
277
- 'status' => rest_authorization_required_code(),
278
- )
279
- );
280
- }
281
 
282
- $thread = $this->get_thread_object( $request['id'] );
 
283
 
284
- if ( true === $retval && empty( $thread->thread_id ) ) {
285
- $retval = new WP_Error(
286
- 'bp_rest_invalid_id',
287
- __( 'Sorry, this thread does not exist.', 'buddypress' ),
288
- array(
289
- 'status' => 404,
290
- )
291
- );
292
- }
293
-
294
- if ( true === $retval && bp_current_user_can( 'bp_moderate' ) ) {
295
- $retval = true;
296
- } else {
297
- $id = messages_check_thread_access( $thread->thread_id );
298
- if ( true === $retval && is_null( $id ) ) {
299
  $retval = new WP_Error(
300
- 'bp_rest_authorization_required',
301
- __( 'Sorry, you are not allowed to see this thread.', 'buddypress' ),
302
  array(
303
- 'status' => rest_authorization_required_code(),
304
  )
305
  );
306
- }
307
-
308
- if ( true === $retval ) {
309
  $retval = true;
 
 
310
  }
311
  }
312
 
@@ -315,7 +297,7 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
315
  *
316
  * @since 5.0.0
317
  *
318
- * @param bool|WP_Error $retval Returned value.
319
  * @param WP_REST_Request $request The request sent to the API.
320
  */
321
  return apply_filters( 'bp_rest_messages_get_item_permissions_check', $retval, $request );
@@ -385,10 +367,16 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
385
  * @since 5.0.0
386
  *
387
  * @param WP_REST_Request $request Full details about the request.
388
- * @return WP_Error|bool
389
  */
390
  public function create_item_permissions_check( $request ) {
391
- $retval = true;
 
 
 
 
 
 
392
 
393
  if ( ! is_user_logged_in() ) {
394
  $retval = new WP_Error(
@@ -398,6 +386,18 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
398
  'status' => rest_authorization_required_code(),
399
  )
400
  );
 
 
 
 
 
 
 
 
 
 
 
 
401
  }
402
 
403
  /**
@@ -405,7 +405,7 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
405
  *
406
  * @since 5.0.0
407
  *
408
- * @param bool|WP_Error $retval Returned value.
409
  * @param WP_REST_Request $request The request sent to the API.
410
  */
411
  return apply_filters( 'bp_rest_messages_create_item_permissions_check', $retval, $request );
@@ -501,7 +501,7 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
501
  * @since 5.0.0
502
  *
503
  * @param WP_REST_Request $request Full details about the request.
504
- * @return bool|WP_Error
505
  */
506
  public function update_item_permissions_check( $request ) {
507
  $retval = $this->get_item_permissions_check( $request );
@@ -511,7 +511,7 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
511
  *
512
  * @since 5.0.0
513
  *
514
- * @param bool|WP_Error $retval Returned value.
515
  * @param WP_REST_Request $request The request sent to the API.
516
  */
517
  return apply_filters( 'bp_rest_messages_update_item_permissions_check', $retval, $request );
@@ -597,20 +597,23 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
597
  * @since 5.0.0
598
  *
599
  * @param WP_REST_Request $request Full details about the request.
600
- * @return bool|WP_Error
601
  */
602
  public function update_starred_permissions_check( $request ) {
603
- $retval = true;
604
- $thread_id = messages_get_message_thread_id( $request['id'] );
 
 
 
 
 
605
 
606
- if ( ! is_user_logged_in() || ! messages_check_thread_access( $thread_id ) ) {
607
- $retval = new WP_Error(
608
- 'bp_rest_authorization_required',
609
- __( 'Sorry, you are not allowed to star/unstar messages.', 'buddypress' ),
610
- array(
611
- 'status' => rest_authorization_required_code(),
612
- )
613
- );
614
  }
615
 
616
  /**
@@ -618,7 +621,7 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
618
  *
619
  * @since 5.0.0
620
  *
621
- * @param bool|WP_Error $retval Returned value.
622
  * @param WP_REST_Request $request The request sent to the API.
623
  */
624
  return apply_filters( 'bp_rest_messages_update_starred_permissions_check', $retval, $request );
@@ -688,7 +691,7 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
688
  * @since 5.0.0
689
  *
690
  * @param WP_REST_Request $request Full details about the request.
691
- * @return WP_Error|bool
692
  */
693
  public function delete_item_permissions_check( $request ) {
694
  $retval = $this->get_item_permissions_check( $request );
@@ -698,7 +701,7 @@ class BP_REST_Messages_Endpoint extends WP_REST_Controller {
698
  *
699
  * @since 5.0.0
700
  *
701
- * @param bool|WP_Error $retval Returned value.
702
  * @param WP_REST_Request $request The request sent to the API.
703
  */
704
  return apply_filters( 'bp_rest_messages_delete_item_permissions_check', $retval, $request );
177
  * @since 5.0.0
178
  *
179
  * @param WP_REST_Request $request Full data about the request.
180
+ * @return true|WP_Error
181
  */
182
  public function get_items_permissions_check( $request ) {
183
+ $retval = new WP_Error(
184
+ 'bp_rest_authorization_required',
185
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
186
+ array(
187
+ 'status' => rest_authorization_required_code(),
188
+ )
189
+ );
 
 
 
 
 
 
190
 
191
+ if ( is_user_logged_in() ) {
192
+ $user = bp_rest_get_user( $request['user_id'] );
 
 
 
 
 
 
 
193
 
194
+ if ( ! $user instanceof WP_User ) {
195
+ $retval = new WP_Error(
196
+ 'bp_rest_invalid_id',
197
+ __( 'Invalid member ID.', 'buddypress' ),
198
+ array(
199
+ 'status' => 404,
200
+ )
201
+ );
202
+ } elseif ( (int) bp_loggedin_user_id() === $user->ID || bp_current_user_can( 'bp_moderate' ) ) {
203
+ $retval = true;
204
+ } else {
205
+ $retval = new WP_Error(
206
+ 'bp_rest_authorization_required',
207
+ __( 'Sorry, you cannot view the messages.', 'buddypress' ),
208
+ array(
209
+ 'status' => rest_authorization_required_code(),
210
+ )
211
+ );
212
+ }
213
  }
214
 
215
  /**
217
  *
218
  * @since 5.0.0
219
  *
220
+ * @param true|WP_Error $retval Returned value.
221
  * @param WP_REST_Request $request The request sent to the API.
222
  */
223
  return apply_filters( 'bp_rest_messages_get_items_permissions_check', $retval, $request );
262
  * @since 5.0.0
263
  *
264
  * @param WP_REST_Request $request Full data about the request.
265
+ * @return true|WP_Error
266
  */
267
  public function get_item_permissions_check( $request ) {
268
+ $error = new WP_Error(
269
+ 'bp_rest_authorization_required',
270
+ __( 'Sorry, you are not allowed to see this thread.', 'buddypress' ),
271
+ array(
272
+ 'status' => rest_authorization_required_code(),
273
+ )
274
+ );
275
+ $retval = $error;
 
 
 
276
 
277
+ if ( is_user_logged_in() ) {
278
+ $thread = $this->get_thread_object( $request['id'] );
279
 
280
+ if ( empty( $thread->thread_id ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  $retval = new WP_Error(
282
+ 'bp_rest_invalid_id',
283
+ __( 'Sorry, this thread does not exist.', 'buddypress' ),
284
  array(
285
+ 'status' => 404,
286
  )
287
  );
288
+ } elseif ( bp_current_user_can( 'bp_moderate' ) || messages_check_thread_access( $thread->thread_id ) ) {
 
 
289
  $retval = true;
290
+ } else {
291
+ $retval = $error;
292
  }
293
  }
294
 
297
  *
298
  * @since 5.0.0
299
  *
300
+ * @param true|WP_Error $retval Returned value.
301
  * @param WP_REST_Request $request The request sent to the API.
302
  */
303
  return apply_filters( 'bp_rest_messages_get_item_permissions_check', $retval, $request );
367
  * @since 5.0.0
368
  *
369
  * @param WP_REST_Request $request Full details about the request.
370
+ * @return true|WP_Error
371
  */
372
  public function create_item_permissions_check( $request ) {
373
+ $retval = new WP_Error(
374
+ 'bp_rest_authorization_required',
375
+ __( 'Sorry, you are not allowed to perform this action.', 'buddypress' ),
376
+ array(
377
+ 'status' => rest_authorization_required_code(),
378
+ )
379
+ );
380
 
381
  if ( ! is_user_logged_in() ) {
382
  $retval = new WP_Error(
386
  'status' => rest_authorization_required_code(),
387
  )
388
  );
389
+ } else {
390
+ $thread_id = (int) $request->get_param( 'id' );
391
+
392
+ // It's an existing thread.
393
+ if ( $thread_id ) {
394
+ if ( bp_current_user_can( 'bp_moderate' ) || ( messages_is_valid_thread( $thread_id ) && messages_check_thread_access( $thread_id ) ) ) {
395
+ $retval = true;
396
+ }
397
+ } else {
398
+ // It's a new thread.
399
+ $retval = true;
400
+ }
401
  }
402
 
403
  /**
405
  *
406
  * @since 5.0.0
407
  *
408
+ * @param true|WP_Error $retval Returned value.
409
  * @param WP_REST_Request $request The request sent to the API.
410
  */
411
  return apply_filters( 'bp_rest_messages_create_item_permissions_check', $retval, $request );
501
  * @since 5.0.0
502
  *
503
  * @param WP_REST_Request $request Full details about the request.
504
+ * @return true|WP_Error
505
  */
506
  public function update_item_permissions_check( $request ) {
507
  $retval = $this->get_item_permissions_check( $request );
511
  *
512
  * @since 5.0.0
513
  *
514
+ * @param true|WP_Error $retval Returned value.
515
  * @param WP_REST_Request $request The request sent to the API.
516
  */
517
  return apply_filters( 'bp_rest_messages_update_item_permissions_check', $retval, $request );
597
  * @since 5.0.0
598
  *
599
  * @param WP_REST_Request $request Full details about the request.
600
+ * @return true|WP_Error
601
  */
602
  public function update_starred_permissions_check( $request ) {
603
+ $retval = new WP_Error(
604
+ 'bp_rest_authorization_required',
605
+ __( 'Sorry, you are not allowed to star/unstar messages.', 'buddypress' ),
606
+ array(
607
+ 'status' => rest_authorization_required_code(),
608
+ )
609
+ );
610
 
611
+ if ( is_user_logged_in() ) {
612
+ $thread_id = messages_get_message_thread_id( $request['id'] );
613
+
614
+ if ( messages_check_thread_access( $thread_id ) ) {
615
+ $retval = true;
616
+ }
 
 
617
  }
618
 
619
  /**
621
  *
622
  * @since 5.0.0
623
  *
624
+ * @param true|WP_Error $retval Returned value.
625
  * @param WP_REST_Request $request The request sent to the API.
626
  */
627
  return apply_filters( 'bp_rest_messages_update_starred_permissions_check', $retval, $request );
691
  * @since 5.0.0
692
  *
693
  * @param WP_REST_Request $request Full details about the request.
694
+ * @return true|WP_Error
695
  */
696
  public function delete_item_permissions_check( $request ) {
697
  $retval = $this->get_item_permissions_check( $request );
701
  *
702
  * @since 5.0.0
703
  *
704
+ * @param true|WP_Error $retval Returned value.
705
  * @param WP_REST_Request $request The request sent to the API.
706
  */
707
  return apply_filters( 'bp_rest_messages_delete_item_permissions_check', $retval, $request );
bp-notifications/classes/class-bp-rest-notifications-endpoint.php CHANGED
@@ -161,19 +161,17 @@ class BP_REST_Notifications_Endpoint extends WP_REST_Controller {
161
  * @since 5.0.0
162
  *
163
  * @param WP_REST_Request $request Full data about the request.
164
- * @return WP_Error|bool
165
  */
166
  public function get_items_permissions_check( $request ) {
167
- $retval = true;
 
 
 
 
168
 
169
- if ( ! is_user_logged_in() || ( bp_loggedin_user_id() !== $request['user_id'] && ! $this->can_see() ) ) {
170
- $retval = new WP_Error(
171
- 'bp_rest_authorization_required',
172
- __( 'Sorry, you are not allowed to see the notifications.', 'buddypress' ),
173
- array(
174
- 'status' => rest_authorization_required_code(),
175
- )
176
- );
177
  }
178
 
179
  /**
@@ -181,7 +179,7 @@ class BP_REST_Notifications_Endpoint extends WP_REST_Controller {
181
  *
182
  * @since 5.0.0
183
  *
184
- * @param bool|WP_Error $retval Returned value.
185
  * @param WP_REST_Request $request The request sent to the API.
186
  */
187
  return apply_filters( 'bp_rest_notifications_get_items_permissions_check', $retval, $request );
@@ -226,41 +224,39 @@ class BP_REST_Notifications_Endpoint extends WP_REST_Controller {
226
  * @since 5.0.0
227
  *
228
  * @param WP_REST_Request $request Full data about the request.
229
- * @return WP_Error|bool
230
  */
231
  public function get_item_permissions_check( $request ) {
232
- $retval = true;
233
-
234
- if ( ! is_user_logged_in() ) {
235
- $retval = new WP_Error(
236
- 'bp_rest_authorization_required',
237
- __( 'Sorry, you are not allowed to see the notification.', 'buddypress' ),
238
- array(
239
- 'status' => rest_authorization_required_code(),
240
- )
241
- );
242
- }
243
-
244
- $notification = $this->get_notification_object( $request );
245
-
246
- if ( true === $retval && is_null( $notification->item_id ) ) {
247
- $retval = new WP_Error(
248
- 'bp_rest_notification_invalid_id',
249
- __( 'Invalid notification ID.', 'buddypress' ),
250
- array(
251
- 'status' => 404,
252
- )
253
- );
254
- }
255
 
256
- if ( true === $retval && ! $this->can_see( $notification->id ) ) {
257
- $retval = new WP_Error(
258
- 'bp_rest_authorization_required',
259
- __( 'Sorry, you cannot view this notification.', 'buddypress' ),
260
- array(
261
- 'status' => rest_authorization_required_code(),
262
- )
263
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  }
265
 
266
  /**
@@ -268,7 +264,7 @@ class BP_REST_Notifications_Endpoint extends WP_REST_Controller {
268
  *
269
  * @since 5.0.0
270
  *
271
- * @param bool|WP_Error $retval Returned value.
272
  * @param WP_REST_Request $request The request sent to the API.
273
  */
274
  return apply_filters( 'bp_rest_notifications_get_item_permissions_check', $retval, $request );
@@ -333,7 +329,7 @@ class BP_REST_Notifications_Endpoint extends WP_REST_Controller {
333
  * @since 5.0.0
334
  *
335
  * @param WP_REST_Request $request Full details about the request.
336
- * @return WP_Error|bool
337
  */
338
  public function create_item_permissions_check( $request ) {
339
  $retval = $this->get_items_permissions_check( $request );
@@ -343,7 +339,7 @@ class BP_REST_Notifications_Endpoint extends WP_REST_Controller {
343
  *
344
  * @since 5.0.0
345
  *
346
- * @param bool|WP_Error $retval Returned value.
347
  * @param WP_REST_Request $request The request sent to the API.
348
  */
349
  return apply_filters( 'bp_rest_notifications_create_item_permissions_check', $retval, $request );
@@ -426,7 +422,7 @@ class BP_REST_Notifications_Endpoint extends WP_REST_Controller {
426
  * @since 5.0.0
427
  *
428
  * @param WP_REST_Request $request Full details about the request.
429
- * @return WP_Error|bool
430
  */
431
  public function update_item_permissions_check( $request ) {
432
  $retval = $this->get_item_permissions_check( $request );
@@ -436,7 +432,7 @@ class BP_REST_Notifications_Endpoint extends WP_REST_Controller {
436
  *
437
  * @since 5.0.0
438
  *
439
- * @param bool|WP_Error $retval Returned value.
440
  * @param WP_REST_Request $request The request sent to the API.
441
  */
442
  return apply_filters( 'bp_rest_notifications_update_item_permissions_check', $retval, $request );
@@ -497,7 +493,7 @@ class BP_REST_Notifications_Endpoint extends WP_REST_Controller {
497
  * @since 5.0.0
498
  *
499
  * @param WP_REST_Request $request Full details about the request.
500
- * @return bool|WP_Error
501
  */
502
  public function delete_item_permissions_check( $request ) {
503
  $retval = $this->get_item_permissions_check( $request );
@@ -507,7 +503,7 @@ class BP_REST_Notifications_Endpoint extends WP_REST_Controller {
507
  *
508
  * @since 5.0.0
509
  *
510
- * @param bool|WP_Error $retval Returned value.
511
  * @param WP_REST_Request $request The request sent to the API.
512
  */
513
  return apply_filters( 'bp_rest_notifications_delete_item_permissions_check', $retval, $request );
161
  * @since 5.0.0
162
  *
163
  * @param WP_REST_Request $request Full data about the request.
164
+ * @return true|WP_Error
165
  */
166
  public function get_items_permissions_check( $request ) {
167
+ $retval = new WP_Error(
168
+ 'bp_rest_authorization_required',
169
+ __( 'Sorry, you are not allowed to see the notifications.', 'buddypress' ),
170
+ array( 'status' => rest_authorization_required_code() )
171
+ );
172
 
173
+ if ( ( is_user_logged_in() && bp_loggedin_user_id() === $request->get_param( 'user_id' ) && ! $request->get_param( 'user_ids' ) ) || $this->can_see() ) {
174
+ $retval = true;
 
 
 
 
 
 
175
  }
176
 
177
  /**
179
  *
180
  * @since 5.0.0
181
  *
182
+ * @param true|WP_Error $retval Returned value.
183
  * @param WP_REST_Request $request The request sent to the API.
184
  */
185
  return apply_filters( 'bp_rest_notifications_get_items_permissions_check', $retval, $request );
224
  * @since 5.0.0
225
  *
226
  * @param WP_REST_Request $request Full data about the request.
227
+ * @return true|WP_Error
228
  */
229
  public function get_item_permissions_check( $request ) {
230
+ $retval = new WP_Error(
231
+ 'bp_rest_authorization_required',
232
+ __( 'Sorry, you are not allowed to see the notification.', 'buddypress' ),
233
+ array(
234
+ 'status' => rest_authorization_required_code(),
235
+ )
236
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
 
238
+ if ( is_user_logged_in() ) {
239
+ $notification = $this->get_notification_object( $request );
240
+
241
+ if ( is_null( $notification->item_id ) ) {
242
+ $retval = new WP_Error(
243
+ 'bp_rest_notification_invalid_id',
244
+ __( 'Invalid notification ID.', 'buddypress' ),
245
+ array(
246
+ 'status' => 404,
247
+ )
248
+ );
249
+ } elseif ( $this->can_see( $notification->id ) ) {
250
+ $retval = true;
251
+ } else {
252
+ $retval = new WP_Error(
253
+ 'bp_rest_authorization_required',
254
+ __( 'Sorry, you cannot view this notification.', 'buddypress' ),
255
+ array(
256
+ 'status' => rest_authorization_required_code(),
257
+ )
258
+ );
259
+ }
260
  }
261
 
262
  /**
264
  *
265
  * @since 5.0.0
266
  *
267
+ * @param true|WP_Error $retval Returned value.
268
  * @param WP_REST_Request $request The request sent to the API.
269
  */
270
  return apply_filters( 'bp_rest_notifications_get_item_permissions_check', $retval, $request );
329
  * @since 5.0.0
330
  *
331
  * @param WP_REST_Request $request Full details about the request.
332
+ * @return true|WP_Error
333
  */
334
  public function create_item_permissions_check( $request ) {
335
  $retval = $this->get_items_permissions_check( $request );
339
  *
340
  * @since 5.0.0
341
  *
342
+ * @param true|WP_Error $retval Returned value.
343
  * @param WP_REST_Request $request The request sent to the API.
344
  */
345
  return apply_filters( 'bp_rest_notifications_create_item_permissions_check', $retval, $request );
422
  * @since 5.0.0
423
  *
424
  * @param WP_REST_Request $request Full details about the request.
425
+ * @return true|WP_Error|bool
426
  */
427
  public function update_item_permissions_check( $request ) {
428
  $retval = $this->get_item_permissions_check( $request );
432
  *
433
  * @since 5.0.0
434
  *
435
+ * @param true|WP_Error $retval Returned value.
436
  * @param WP_REST_Request $request The request sent to the API.
437
  */
438
  return apply_filters( 'bp_rest_notifications_update_item_permissions_check', $retval, $request );
493
  * @since 5.0.0
494
  *
495
  * @param WP_REST_Request $request Full details about the request.
496
+ * @return true|WP_Error
497
  */
498
  public function delete_item_permissions_check( $request ) {
499
  $retval = $this->get_item_permissions_check( $request );
503
  *
504
  * @since 5.0.0
505
  *
506
+ * @param true|WP_Error $retval Returned value.
507
  * @param WP_REST_Request $request The request sent to the API.
508
  */
509
  return apply_filters( 'bp_rest_notifications_delete_item_permissions_check', $retval, $request );
bp-templates/bp-nouveau/includes/groups/functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Groups functions
4
  *
5
  * @since 3.0.0
6
- * @version 6.3.0
7
  */
8
 
9
  // Exit if accessed directly.
@@ -508,6 +508,40 @@ function bp_nouveau_groups_screen_invites_restriction() {
508
  bp_core_load_template( apply_filters( 'bp_nouveau_groups_screen_invites_restriction', 'members/single/settings/group-invites' ) );
509
  }
510
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
511
  /**
512
  * @since 3.0.0
513
  */
@@ -1236,3 +1270,25 @@ function bp_nouveau_groups_notification_filters() {
1236
  bp_nouveau_notifications_register_filter( $notification );
1237
  }
1238
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Groups functions
4
  *
5
  * @since 3.0.0
6
+ * @version 7.2.1
7
  */
8
 
9
  // Exit if accessed directly.
508
  bp_core_load_template( apply_filters( 'bp_nouveau_groups_screen_invites_restriction', 'members/single/settings/group-invites' ) );
509
  }
510
 
511
+ /**
512
+ * Makes sure the BP REST API groups/invites endpoint respects invite restrictions.
513
+ *
514
+ * @since 7.2.1
515
+ *
516
+ * @param bool|WP_Error $retval Whether the request can continue.
517
+ * @param WP_REST_Request $request The request sent to the API.
518
+ * @return bool|WP_Error
519
+ */
520
+ function bp_nouveau_restrict_rest_group_invite_to_friends( $retval, $request ) {
521
+ if ( true === $retval && bp_is_active( 'friends' ) ) {
522
+ $group_id = $request->get_param( 'group_id' );
523
+ $user_id = $request->get_param( 'user_id' );
524
+ $inviter_id = $request->get_param( 'inviter_id' );
525
+
526
+ if ( ! $inviter_id ) {
527
+ $inviter_id = bp_loggedin_user_id();
528
+ }
529
+
530
+ if ( bp_nouveau_groups_get_group_invites_setting( $user_id ) && 'is_friend' !== BP_Friends_Friendship::check_is_friend( $inviter_id, $user_id ) ) {
531
+ $retval = new WP_Error(
532
+ 'bp_rest_group_invite_cannot_create_item',
533
+ __( 'Sorry, you are not allowed to create the invitation as requested.', 'buddypress' ),
534
+ array(
535
+ 'status' => rest_authorization_required_code(),
536
+ )
537
+ );
538
+ }
539
+ }
540
+
541
+ return $retval;
542
+ }
543
+ add_filter( 'bp_rest_group_invites_create_item_permissions_check', 'bp_nouveau_restrict_rest_group_invite_to_friends', 10, 2 );
544
+
545
  /**
546
  * @since 3.0.0
547
  */
1270
  bp_nouveau_notifications_register_filter( $notification );
1271
  }
1272
  }
1273
+
1274
+ /**
1275
+ * Makes sure the Nouveau specific behavior about Group invites visibility is applied to the REST API.
1276
+ *
1277
+ * @since 7.2.1
1278
+ *
1279
+ * @param true|WP_Error $retval Whether the current user can list invites.
1280
+ * @param WP_REST_Request $request The request sent to the API.
1281
+ * @return true|WP_Error Whether the current user can list invites.
1282
+ */
1283
+ function bp_nouveau_rest_group_invites_get_items_permissions_check( $retval, $request ) {
1284
+ if ( is_wp_error( $retval ) ) {
1285
+ $group_id = (int) $request['group_id'];
1286
+
1287
+ if ( groups_is_user_member( bp_loggedin_user_id(), $group_id ) ) {
1288
+ $retval = true;
1289
+ }
1290
+ }
1291
+
1292
+ return $retval;
1293
+ }
1294
+ add_filter( 'bp_rest_group_invites_get_items_permissions_check', 'bp_nouveau_rest_group_invites_get_items_permissions_check', 10, 2 );
bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php CHANGED
@@ -129,10 +129,16 @@ class BP_REST_XProfile_Data_Endpoint extends WP_REST_Controller {
129
  * @since 5.0.0
130
  *
131
  * @param WP_REST_Request $request Full data about the request.
132
- * @return WP_Error|bool
133
  */
134
  public function get_item_permissions_check( $request ) {
135
- $retval = true;
 
 
 
 
 
 
136
 
137
  // Check the field exists.
138
  $field = $this->get_xprofile_field_object( $request->get_param( 'field_id' ) );
@@ -145,30 +151,25 @@ class BP_REST_XProfile_Data_Endpoint extends WP_REST_Controller {
145
  'status' => 404,
146
  )
147
  );
148
- }
149
-
150
- // Check the requested user exists.
151
- if ( true === $retval && ! bp_rest_get_user( $request->get_param( 'user_id' ) ) ) {
152
- $retval = new WP_Error(
153
- 'bp_rest_member_invalid_id',
154
- __( 'Invalid member ID.', 'buddypress' ),
155
- array(
156
- 'status' => 404,
157
- )
158
- );
159
- }
160
-
161
- // Check the user can view this field value.
162
- $hidden_user_fields = bp_xprofile_get_hidden_fields_for_user( $request->get_param( 'user_id' ) );
163
-
164
- if ( true === $retval && in_array( $field->id, $hidden_user_fields, true ) ) {
165
- $retval = new WP_Error(
166
- 'bp_rest_hidden_profile_field',
167
- __( 'Sorry, the profile field value is not viewable for this user.', 'buddypress' ),
168
- array(
169
- 'status' => 403,
170
- )
171
- );
172
  }
173
 
174
  /**
@@ -176,7 +177,7 @@ class BP_REST_XProfile_Data_Endpoint extends WP_REST_Controller {
176
  *
177
  * @since 5.0.0
178
  *
179
- * @param bool|WP_Error $retval Returned value.
180
  * @param WP_REST_Request $request The request sent to the API.
181
  */
182
  return apply_filters( 'bp_rest_xprofile_data_get_item_permissions_check', $retval, $request );
@@ -269,12 +270,32 @@ class BP_REST_XProfile_Data_Endpoint extends WP_REST_Controller {
269
  * @since 5.0.0
270
  *
271
  * @param WP_REST_Request $request Full data about the request.
272
- * @return WP_Error|bool
273
  */
274
  public function update_item_permissions_check( $request ) {
275
- $retval = true;
 
 
 
 
 
 
276
 
277
- if ( ! is_user_logged_in() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  $retval = new WP_Error(
279
  'bp_rest_authorization_required',
280
  __( 'Sorry, you need to be logged in to save XProfile data.', 'buddypress' ),
@@ -284,34 +305,12 @@ class BP_REST_XProfile_Data_Endpoint extends WP_REST_Controller {
284
  );
285
  }
286
 
287
- $user = bp_rest_get_user( $request->get_param( 'user_id' ) );
288
-
289
- if ( true === $retval && ! $user instanceof WP_User ) {
290
- $retval = new WP_Error(
291
- 'bp_rest_invalid_id',
292
- __( 'Invalid member ID.', 'buddypress' ),
293
- array(
294
- 'status' => 404,
295
- )
296
- );
297
- }
298
-
299
- if ( true === $retval && ! $this->can_see( $user->ID ) ) {
300
- $retval = new WP_Error(
301
- 'bp_rest_authorization_required',
302
- __( 'Sorry, you cannot save XProfile field data.', 'buddypress' ),
303
- array(
304
- 'status' => rest_authorization_required_code(),
305
- )
306
- );
307
- }
308
-
309
  /**
310
  * Filter the XProfile data `update_item` permissions check.
311
  *
312
  * @since 5.0.0
313
  *
314
- * @param bool|WP_Error $retval Returned value.
315
  * @param WP_REST_Request $request The request sent to the API.
316
  */
317
  return apply_filters( 'bp_rest_xprofile_data_update_item_permissions_check', $retval, $request );
@@ -345,10 +344,11 @@ class BP_REST_XProfile_Data_Endpoint extends WP_REST_Controller {
345
 
346
  // Get the field data before it's deleted.
347
  $field_data = $this->get_xprofile_field_data_object( $field->id, $user->ID );
 
348
 
349
  // Set empty for the response.
350
  $field_data->value = '';
351
- $previous = $this->prepare_item_for_response( $field_data, $request );
352
 
353
  if ( false === $field_data->delete() ) {
354
  return new WP_Error(
@@ -391,7 +391,7 @@ class BP_REST_XProfile_Data_Endpoint extends WP_REST_Controller {
391
  * @since 5.0.0
392
  *
393
  * @param WP_REST_Request $request Full data about the request.
394
- * @return WP_Error|bool
395
  */
396
  public function delete_item_permissions_check( $request ) {
397
  $retval = $this->update_item_permissions_check( $request );
@@ -401,7 +401,7 @@ class BP_REST_XProfile_Data_Endpoint extends WP_REST_Controller {
401
  *
402
  * @since 5.0.0
403
  *
404
- * @param bool|WP_Error $retval Returned value.
405
  * @param WP_REST_Request $request The request sent to the API.
406
  */
407
  return apply_filters( 'bp_rest_xprofile_data_delete_item_permissions_check', $retval, $request );
129
  * @since 5.0.0
130
  *
131
  * @param WP_REST_Request $request Full data about the request.
132
+ * @return true|WP_Error
133
  */
134
  public function get_item_permissions_check( $request ) {
135
+ $retval = new WP_Error(
136
+ 'bp_rest_hidden_profile_field',
137
+ __( 'Sorry, the profile field value is not viewable for this user.', 'buddypress' ),
138
+ array(
139
+ 'status' => 403,
140
+ )
141
+ );
142
 
143
  // Check the field exists.
144
  $field = $this->get_xprofile_field_object( $request->get_param( 'field_id' ) );
151
  'status' => 404,
152
  )
153
  );
154
+ } else {
155
+ $user = bp_rest_get_user( $request->get_param( 'user_id' ) );
156
+
157
+ if ( ! $user instanceof WP_User ) {
158
+ $retval = new WP_Error(
159
+ 'bp_rest_member_invalid_id',
160
+ __( 'Invalid member ID.', 'buddypress' ),
161
+ array(
162
+ 'status' => 404,
163
+ )
164
+ );
165
+ } else {
166
+ // Check the user can view this field value.
167
+ $hidden_user_fields = bp_xprofile_get_hidden_fields_for_user( $user->ID );
168
+
169
+ if ( ! in_array( $field->id, $hidden_user_fields, true ) ) {
170
+ $retval = true;
171
+ }
172
+ }
 
 
 
 
 
173
  }
174
 
175
  /**
177
  *
178
  * @since 5.0.0
179
  *
180
+ * @param true|WP_Error $retval Returned value.
181
  * @param WP_REST_Request $request The request sent to the API.
182
  */
183
  return apply_filters( 'bp_rest_xprofile_data_get_item_permissions_check', $retval, $request );
270
  * @since 5.0.0
271
  *
272
  * @param WP_REST_Request $request Full data about the request.
273
+ * @return true|WP_Error
274
  */
275
  public function update_item_permissions_check( $request ) {
276
+ $retval = new WP_Error(
277
+ 'bp_rest_authorization_required',
278
+ __( 'Sorry, you cannot save XProfile field data.', 'buddypress' ),
279
+ array(
280
+ 'status' => rest_authorization_required_code(),
281
+ )
282
+ );
283
 
284
+ if ( is_user_logged_in() ) {
285
+ $user = bp_rest_get_user( $request->get_param( 'user_id' ) );
286
+
287
+ if ( ! $user instanceof WP_User ) {
288
+ $retval = new WP_Error(
289
+ 'bp_rest_invalid_id',
290
+ __( 'Invalid member ID.', 'buddypress' ),
291
+ array(
292
+ 'status' => 404,
293
+ )
294
+ );
295
+ } elseif ( $this->can_see( $user->ID ) ) {
296
+ $retval = true;
297
+ }
298
+ } else {
299
  $retval = new WP_Error(
300
  'bp_rest_authorization_required',
301
  __( 'Sorry, you need to be logged in to save XProfile data.', 'buddypress' ),
305
  );
306
  }
307
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
  /**
309
  * Filter the XProfile data `update_item` permissions check.
310
  *
311
  * @since 5.0.0
312
  *
313
+ * @param true|WP_Error $retval Returned value.
314
  * @param WP_REST_Request $request The request sent to the API.
315
  */
316
  return apply_filters( 'bp_rest_xprofile_data_update_item_permissions_check', $retval, $request );
344
 
345
  // Get the field data before it's deleted.
346
  $field_data = $this->get_xprofile_field_data_object( $field->id, $user->ID );
347
+ $previous = clone $field_data;
348
 
349
  // Set empty for the response.
350
  $field_data->value = '';
351
+ $previous = $this->prepare_item_for_response( $previous, $request );
352
 
353
  if ( false === $field_data->delete() ) {
354
  return new WP_Error(
391
  * @since 5.0.0
392
  *
393
  * @param WP_REST_Request $request Full data about the request.
394
+ * @return true|WP_Error
395
  */
396
  public function delete_item_permissions_check( $request ) {
397
  $retval = $this->update_item_permissions_check( $request );
401
  *
402
  * @since 5.0.0
403
  *
404
+ * @param true|WP_Error $retval Returned value.
405
  * @param WP_REST_Request $request The request sent to the API.
406
  */
407
  return apply_filters( 'bp_rest_xprofile_data_delete_item_permissions_check', $retval, $request );
bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php CHANGED
@@ -208,7 +208,7 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
208
  * @since 5.0.0
209
  *
210
  * @param WP_REST_Request $request Full data about the request.
211
- * @return bool
212
  */
213
  public function get_items_permissions_check( $request ) {
214
 
@@ -217,7 +217,7 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
217
  *
218
  * @since 5.0.0
219
  *
220
- * @param bool $retval Returned value.
221
  * @param WP_REST_Request $request The request sent to the API.
222
  */
223
  return apply_filters( 'bp_rest_xprofile_field_groups_get_items_permissions_check', true, $request );
@@ -272,7 +272,7 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
272
  * @since 5.0.0
273
  *
274
  * @param WP_REST_Request $request Full data about the request.
275
- * @return bool|WP_Error
276
  */
277
  public function get_item_permissions_check( $request ) {
278
  $retval = $this->get_items_permissions_check( $request );
@@ -282,7 +282,7 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
282
  *
283
  * @since 5.0.0
284
  *
285
- * @param bool|WP_Error $retval Returned value.
286
  * @param WP_REST_Request $request The request sent to the API.
287
  */
288
  return apply_filters( 'bp_rest_xprofile_field_groups_get_item_permissions_check', $retval, $request );
@@ -303,7 +303,6 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
303
  $args = array(
304
  'name' => $request['name'],
305
  'description' => $request['description'],
306
- 'can_delete' => $request['can_delete'],
307
  );
308
 
309
  /**
@@ -375,19 +374,19 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
375
  * @since 5.0.0
376
  *
377
  * @param WP_REST_Request $request Full data about the request.
378
- * @return WP_Error|bool
379
  */
380
  public function create_item_permissions_check( $request ) {
381
- $retval = true;
 
 
 
 
 
 
382
 
383
- if ( ! ( is_user_logged_in() && bp_current_user_can( 'bp_moderate' ) ) ) {
384
- $retval = new WP_Error(
385
- 'bp_rest_authorization_required',
386
- __( 'Sorry, you are not allowed to view this XProfile field group.', 'buddypress' ),
387
- array(
388
- 'status' => rest_authorization_required_code(),
389
- )
390
- );
391
  }
392
 
393
  /**
@@ -395,7 +394,7 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
395
  *
396
  * @since 5.0.0
397
  *
398
- * @param bool|WP_Error $retval Returned value.
399
  * @param WP_REST_Request $request The request sent to the API.
400
  */
401
  return apply_filters( 'bp_rest_xprofile_field_groups_create_item_permissions_check', $retval, $request );
@@ -429,7 +428,6 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
429
  'field_group_id' => $field_group->id,
430
  'name' => is_null( $request['name'] ) ? $field_group->name : $request['name'],
431
  'description' => is_null( $request['description'] ) ? $field_group->description : $request['description'],
432
- 'can_delete' => is_null( $request['can_delete'] ) ? (bool) $field_group->can_delete : $request['can_delete'],
433
  );
434
 
435
  $group_id = xprofile_insert_field_group( $args );
@@ -486,7 +484,7 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
486
  * @since 5.0.0
487
  *
488
  * @param WP_REST_Request $request Full data about the request.
489
- * @return WP_Error|bool
490
  */
491
  public function update_item_permissions_check( $request ) {
492
  $retval = $this->create_item_permissions_check( $request );
@@ -496,7 +494,7 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
496
  *
497
  * @since 5.0.0
498
  *
499
- * @param bool|WP_Error $retval Returned value.
500
  * @param WP_REST_Request $request The request sent to the API.
501
  */
502
  return apply_filters( 'bp_rest_xprofile_field_groups_update_item_permissions_check', $retval, $request );
@@ -567,7 +565,7 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
567
  * @since 5.0.0
568
  *
569
  * @param WP_REST_Request $request Full data about the request.
570
- * @return WP_Error|bool
571
  */
572
  public function delete_item_permissions_check( $request ) {
573
  $retval = $this->create_item_permissions_check( $request );
@@ -577,7 +575,7 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
577
  *
578
  * @since 5.0.0
579
  *
580
- * @param bool|WP_Error $retval Returned value.
581
  * @param WP_REST_Request $request The request sent to the API.
582
  */
583
  return apply_filters( 'bp_rest_xprofile_field_groups_delete_item_permissions_check', $retval, $request );
@@ -766,6 +764,7 @@ class BP_REST_XProfile_Field_Groups_Endpoint extends WP_REST_Controller {
766
  'context' => array( 'view', 'edit' ),
767
  'description' => __( 'Whether the group of profile fields can be deleted or not.', 'buddypress' ),
768
  'type' => 'boolean',
 
769
  ),
770
  'fields' => array(
771
  'context' => array( 'view', 'edit' ),
208
  * @since 5.0.0
209
  *
210
  * @param WP_REST_Request $request Full data about the request.
211
+ * @return true|WP_Error
212
  */
213
  public function get_items_permissions_check( $request ) {
214
 
217
  *
218
  * @since 5.0.0
219
  *
220
+ * @param true|WP_Error $retval Returned value.
221
  * @param WP_REST_Request $request The request sent to the API.
222
  */
223
  return apply_filters( 'bp_rest_xprofile_field_groups_get_items_permissions_check', true, $request );
272
  * @since 5.0.0
273
  *
274
  * @param WP_REST_Request $request Full data about the request.
275
+ * @return true|WP_Error
276
  */
277
  public function get_item_permissions_check( $request ) {
278
  $retval = $this->get_items_permissions_check( $request );
282
  *
283
  * @since 5.0.0
284
  *
285
+ * @param true|WP_Error $retval Returned value.
286
  * @param WP_REST_Request $request The request sent to the API.
287
  */
288
  return apply_filters( 'bp_rest_xprofile_field_groups_get_item_permissions_check', $retval, $request );
303
  $args = array(
304
  'name' => $request['name'],
305
  'description' => $request['description'],
 
306
  );
307
 
308
  /**
374
  * @since 5.0.0
375
  *
376
  * @param WP_REST_Request $request Full data about the request.
377
+ * @return true|WP_Error
378
  */
379
  public function create_item_permissions_check( $request ) {
380
+ $retval = new WP_Error(
381
+ 'bp_rest_authorization_required',
382
+ __( 'Sorry, you are not allowed to view this XProfile field group.', 'buddypress' ),
383
+ array(
384
+ 'status' => rest_authorization_required_code(),
385
+ )
386
+ );
387
 
388
+ if ( is_user_logged_in() && bp_current_user_can( 'bp_moderate' ) ) {
389
+ $retval = true;
 
 
 
 
 
 
390
  }
391
 
392
  /**
394
  *
395
  * @since 5.0.0
396
  *
397
+ * @param true|WP_Error $retval Returned value.
398
  * @param WP_REST_Request $request The request sent to the API.
399
  */
400
  return apply_filters( 'bp_rest_xprofile_field_groups_create_item_permissions_check', $retval, $request );
428
  'field_group_id' => $field_group->id,
429
  'name' => is_null( $request['name'] ) ? $field_group->name : $request['name'],
430
  'description' => is_null( $request['description'] ) ? $field_group->description : $request['description'],
 
431
  );
432
 
433
  $group_id = xprofile_insert_field_group( $args );
484
  * @since 5.0.0
485
  *
486
  * @param WP_REST_Request $request Full data about the request.
487
+ * @return true|WP_Error
488
  */
489
  public function update_item_permissions_check( $request ) {
490
  $retval = $this->create_item_permissions_check( $request );
494
  *
495
  * @since 5.0.0
496
  *
497
+ * @param true|WP_Error $retval Returned value.
498
  * @param WP_REST_Request $request The request sent to the API.
499
  */
500
  return apply_filters( 'bp_rest_xprofile_field_groups_update_item_permissions_check', $retval, $request );
565
  * @since 5.0.0
566
  *
567
  * @param WP_REST_Request $request Full data about the request.
568
+ * @return true|WP_Error
569
  */
570
  public function delete_item_permissions_check( $request ) {
571
  $retval = $this->create_item_permissions_check( $request );
575
  *
576
  * @since 5.0.0
577
  *
578
+ * @param true|WP_Error $retval Returned value.
579
  * @param WP_REST_Request $request The request sent to the API.
580
  */
581
  return apply_filters( 'bp_rest_xprofile_field_groups_delete_item_permissions_check', $retval, $request );
764
  'context' => array( 'view', 'edit' ),
765
  'description' => __( 'Whether the group of profile fields can be deleted or not.', 'buddypress' ),
766
  'type' => 'boolean',
767
+ 'readonly' => true,
768
  ),
769
  'fields' => array(
770
  'context' => array( 'view', 'edit' ),
bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php CHANGED
@@ -181,7 +181,7 @@ class BP_REST_XProfile_Fields_Endpoint extends WP_REST_Controller {
181
  * @since 5.0.0
182
  *
183
  * @param WP_REST_Request $request Full data about the request.
184
- * @return bool
185
  */
186
  public function get_items_permissions_check( $request ) {
187
 
@@ -190,7 +190,7 @@ class BP_REST_XProfile_Fields_Endpoint extends WP_REST_Controller {
190
  *
191
  * @since 5.0.0
192
  *
193
- * @param bool $retval Returned value.
194
  * @param WP_REST_Request $request The request sent to the API.
195
  */
196
  return apply_filters( 'bp_rest_xprofile_fields_get_items_permissions_check', true, $request );
@@ -259,7 +259,7 @@ class BP_REST_XProfile_Fields_Endpoint extends WP_REST_Controller {
259
  * @since 5.0.0
260
  *
261
  * @param WP_REST_Request $request Full data about the request.
262
- * @return bool
263
  */
264
  public function get_item_permissions_check( $request ) {
265
 
@@ -268,7 +268,7 @@ class BP_REST_XProfile_Fields_Endpoint extends WP_REST_Controller {
268
  *
269
  * @since 5.0.0
270
  *
271
- * @param bool $retval Returned value.
272
  * @param WP_REST_Request $request The request sent to the API.
273
  */
274
  return apply_filters( 'bp_rest_xprofile_fields_get_item_permissions_check', true, $request );
@@ -414,19 +414,19 @@ class BP_REST_XProfile_Fields_Endpoint extends WP_REST_Controller {
414
  * @since 5.0.0
415
  *
416
  * @param WP_REST_Request $request Full data about the request.
417
- * @return WP_Error|bool
418
  */
419
  public function create_item_permissions_check( $request ) {
420
- $retval = true;
 
 
 
 
 
 
421
 
422
- if ( ! is_user_logged_in() || ! bp_current_user_can( 'bp_moderate' ) ) {
423
- $retval = new WP_Error(
424
- 'bp_rest_authorization_required',
425
- __( 'Sorry, you are not allowed to create a XProfile field.', 'buddypress' ),
426
- array(
427
- 'status' => rest_authorization_required_code(),
428
- )
429
- );
430
  }
431
 
432
  /**
@@ -434,7 +434,7 @@ class BP_REST_XProfile_Fields_Endpoint extends WP_REST_Controller {
434
  *
435
  * @since 5.0.0
436
  *
437
- * @param bool|WP_Error $retval Returned value.
438
  * @param WP_REST_Request $request The request sent to the API.
439
  */
440
  return apply_filters( 'bp_rest_xprofile_fields_create_item_permissions_check', $retval, $request );
@@ -545,7 +545,7 @@ class BP_REST_XProfile_Fields_Endpoint extends WP_REST_Controller {
545
  * @since 5.0.0
546
  *
547
  * @param WP_REST_Request $request Full data about the request.
548
- * @return WP_Error|bool
549
  */
550
  public function update_item_permissions_check( $request ) {
551
  $retval = $this->delete_item_permissions_check( $request );
@@ -555,7 +555,7 @@ class BP_REST_XProfile_Fields_Endpoint extends WP_REST_Controller {
555
  *
556
  * @since 5.0.0
557
  *
558
- * @param bool|WP_Error $retval Returned value.
559
  * @param WP_REST_Request $request The request sent to the API.
560
  */
561
  return apply_filters( 'bp_rest_xprofile_fields_update_item_permissions_check', $retval, $request );
@@ -616,41 +616,31 @@ class BP_REST_XProfile_Fields_Endpoint extends WP_REST_Controller {
616
  * @since 5.0.0
617
  *
618
  * @param WP_REST_Request $request Full data about the request.
619
- * @return WP_Error|bool
620
  */
621
  public function delete_item_permissions_check( $request ) {
622
- $retval = true;
623
-
624
- if ( ! is_user_logged_in() ) {
625
- $retval = new WP_Error(
626
- 'bp_rest_authorization_required',
627
- __( 'Sorry, you are not allowed to delete this field.', 'buddypress' ),
628
- array(
629
- 'status' => rest_authorization_required_code(),
630
- )
631
- );
632
- }
633
-
634
- $field = $this->get_xprofile_field_object( $request );
635
 
636
- if ( true === $retval && empty( $field->id ) ) {
637
- $retval = new WP_Error(
638
- 'bp_rest_invalid_id',
639
- __( 'Invalid field ID.', 'buddypress' ),
640
- array(
641
- 'status' => 404,
642
- )
643
- );
644
- }
645
 
646
- if ( true === $retval && ! bp_current_user_can( 'bp_moderate' ) ) {
647
- $retval = new WP_Error(
648
- 'bp_rest_authorization_required',
649
- __( 'Sorry, you are not allowed to delete this field.', 'buddypress' ),
650
- array(
651
- 'status' => rest_authorization_required_code(),
652
- )
653
- );
 
 
 
654
  }
655
 
656
  /**
@@ -658,7 +648,7 @@ class BP_REST_XProfile_Fields_Endpoint extends WP_REST_Controller {
658
  *
659
  * @since 5.0.0
660
  *
661
- * @param bool|WP_Error $retval Returned value.
662
  * @param WP_REST_Request $request The request sent to the API.
663
  */
664
  return apply_filters( 'bp_rest_xprofile_fields_delete_item_permissions_check', $retval, $request );
181
  * @since 5.0.0
182
  *
183
  * @param WP_REST_Request $request Full data about the request.
184
+ * @return true|WP_Error
185
  */
186
  public function get_items_permissions_check( $request ) {
187
 
190
  *
191
  * @since 5.0.0
192
  *
193
+ * @param true|WP_Error $retval Returned value.
194
  * @param WP_REST_Request $request The request sent to the API.
195
  */
196
  return apply_filters( 'bp_rest_xprofile_fields_get_items_permissions_check', true, $request );
259
  * @since 5.0.0
260
  *
261
  * @param WP_REST_Request $request Full data about the request.
262
+ * @return true|WP_Error
263
  */
264
  public function get_item_permissions_check( $request ) {
265
 
268
  *
269
  * @since 5.0.0
270
  *
271
+ * @param true|WP_Error $retval Returned value.
272
  * @param WP_REST_Request $request The request sent to the API.
273
  */
274
  return apply_filters( 'bp_rest_xprofile_fields_get_item_permissions_check', true, $request );
414
  * @since 5.0.0
415
  *
416
  * @param WP_REST_Request $request Full data about the request.
417
+ * @return true|WP_Error
418
  */
419
  public function create_item_permissions_check( $request ) {
420
+ $retval = new WP_Error(
421
+ 'bp_rest_authorization_required',
422
+ __( 'Sorry, you are not allowed to create a XProfile field.', 'buddypress' ),
423
+ array(
424
+ 'status' => rest_authorization_required_code(),
425
+ )
426
+ );
427
 
428
+ if ( is_user_logged_in() && bp_current_user_can( 'bp_moderate' ) ) {
429
+ $retval = true;
 
 
 
 
 
 
430
  }
431
 
432
  /**
434
  *
435
  * @since 5.0.0
436
  *
437
+ * @param true|WP_Error $retval Returned value.
438
  * @param WP_REST_Request $request The request sent to the API.
439
  */
440
  return apply_filters( 'bp_rest_xprofile_fields_create_item_permissions_check', $retval, $request );
545
  * @since 5.0.0
546
  *
547
  * @param WP_REST_Request $request Full data about the request.
548
+ * @return true|WP_Error
549
  */
550
  public function update_item_permissions_check( $request ) {
551
  $retval = $this->delete_item_permissions_check( $request );
555
  *
556
  * @since 5.0.0
557
  *
558
+ * @param true|WP_Error $retval Returned value.
559
  * @param WP_REST_Request $request The request sent to the API.
560
  */
561
  return apply_filters( 'bp_rest_xprofile_fields_update_item_permissions_check', $retval, $request );
616
  * @since 5.0.0
617
  *
618
  * @param WP_REST_Request $request Full data about the request.
619
+ * @return true|WP_Error
620
  */
621
  public function delete_item_permissions_check( $request ) {
622
+ $retval = new WP_Error(
623
+ 'bp_rest_authorization_required',
624
+ __( 'Sorry, you are not allowed to delete this field.', 'buddypress' ),
625
+ array(
626
+ 'status' => rest_authorization_required_code(),
627
+ )
628
+ );
 
 
 
 
 
 
629
 
630
+ if ( is_user_logged_in() ) {
631
+ $field = $this->get_xprofile_field_object( $request );
 
 
 
 
 
 
 
632
 
633
+ if ( empty( $field->id ) ) {
634
+ $retval = new WP_Error(
635
+ 'bp_rest_invalid_id',
636
+ __( 'Invalid field ID.', 'buddypress' ),
637
+ array(
638
+ 'status' => 404,
639
+ )
640
+ );
641
+ } elseif ( bp_current_user_can( 'bp_moderate' ) ) {
642
+ $retval = true;
643
+ }
644
  }
645
 
646
  /**
648
  *
649
  * @since 5.0.0
650
  *
651
+ * @param true|WP_Error $retval Returned value.
652
  * @param WP_REST_Request $request The request sent to the API.
653
  */
654
  return apply_filters( 'bp_rest_xprofile_fields_delete_item_permissions_check', $retval, $request );
buddypress.pot CHANGED
@@ -9,7 +9,7 @@ msgstr ""
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2021-02-17T21:39:05+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: buddypress\n"
@@ -735,7 +735,7 @@ msgstr ""
735
  #: bp-activity/bp-activity-notifications.php:402
736
  #: bp-blogs/bp-blogs-template.php:1183
737
  #: bp-core/admin/bp-core-admin-tools.php:671
738
- #: bp-core/classes/class-bp-admin-types.php:431
739
  #: bp-friends/bp-friends-functions.php:962
740
  #: bp-friends/bp-friends-notifications.php:256
741
  #: bp-groups/bp-groups-notifications.php:1143
@@ -1192,24 +1192,24 @@ msgstr ""
1192
 
1193
  #: bp-activity/classes/class-bp-rest-activity-endpoint.php:71
1194
  #: bp-activity/classes/class-bp-rest-activity-endpoint.php:109
1195
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1291
1196
- #: bp-members/classes/class-bp-rest-members-endpoint.php:911
1197
  msgid "A unique numeric ID for the activity."
1198
  msgstr ""
1199
 
1200
  #: bp-activity/classes/class-bp-rest-activity-endpoint.php:293
1201
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:599
1202
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:712
1203
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:774
1204
  msgid "Invalid activity ID."
1205
  msgstr ""
1206
 
1207
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:336
1208
  msgid "Sorry, you cannot view the activities."
1209
  msgstr ""
1210
 
1211
  #: bp-activity/classes/class-bp-rest-activity-endpoint.php:368
1212
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:525
1213
  msgid "Please, enter some content."
1214
  msgstr ""
1215
 
@@ -1217,188 +1217,185 @@ msgstr ""
1217
  msgid "Cannot create new activity."
1218
  msgstr ""
1219
 
1220
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:478
1221
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:492
1222
  msgid "Sorry, you are not allowed to create activities."
1223
  msgstr ""
1224
 
1225
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:537
1226
  msgid "Cannot update existing activity."
1227
  msgstr ""
1228
 
1229
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:587
1230
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:609
1231
  msgid "Sorry, you are not allowed to update this activity."
1232
  msgstr ""
1233
 
1234
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:656
1235
  msgid "Could not delete the activity."
1236
  msgstr ""
1237
 
1238
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:700
1239
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:722
1240
  msgid "Sorry, you are not allowed to delete this activity."
1241
  msgstr ""
1242
 
1243
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:786
1244
  msgid "Sorry, you cannot remove the activity from your favorites."
1245
  msgstr ""
1246
 
1247
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:792
1248
  msgid "Sorry, you cannot add the activity to your favorites."
1249
  msgstr ""
1250
 
1251
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:846
1252
  msgid "Sorry, you are not allowed to update favorites."
1253
  msgstr ""
1254
 
1255
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1297
1256
  msgid "The ID of some other object primarily associated with this one."
1257
  msgstr ""
1258
 
1259
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1302
1260
  msgid "The ID of some other object also associated with this one."
1261
  msgstr ""
1262
 
1263
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1307
1264
  msgid "The ID for the author of the activity."
1265
  msgstr ""
1266
 
1267
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1312
1268
  msgid "The permalink to this activity on the site."
1269
  msgstr ""
1270
 
1271
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1318
1272
  msgid "The active BuddyPress component the activity relates to."
1273
  msgstr ""
1274
 
1275
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1327
1276
  msgid "The activity type of the activity."
1277
  msgstr ""
1278
 
1279
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1336
1280
  msgid "The description of the activity's type (eg: Username posted an update)"
1281
  msgstr ""
1282
 
1283
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1345
1284
  msgid "Allowed HTML content for the activity."
1285
  msgstr ""
1286
 
1287
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1353
1288
- #: bp-members/classes/class-bp-rest-members-endpoint.php:916
1289
  msgid "Content for the activity, as it exists in the database."
1290
  msgstr ""
1291
 
1292
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1358
1293
- #: bp-members/classes/class-bp-rest-members-endpoint.php:921
1294
  msgid "HTML content for the activity, transformed for display."
1295
  msgstr ""
1296
 
1297
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1367
1298
  msgid "The date the activity was published, in the site's timezone."
1299
  msgstr ""
1300
 
1301
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1373
1302
  msgid "Whether the activity has been marked as spam or not."
1303
  msgstr ""
1304
 
1305
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1383
1306
  msgid "A list of objects children of the activity object."
1307
  msgstr ""
1308
 
1309
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1389
1310
  msgid "Total number of comments of the activity object."
1311
  msgstr ""
1312
 
1313
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1395
1314
  msgid "Whether the activity object should be sitewide hidden or not."
1315
  msgstr ""
1316
 
1317
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1400
1318
  msgid "Whether the activity object has been favorited by the current user."
1319
  msgstr ""
1320
 
1321
  #. translators: 1: Full avatar width in pixels. 2: Full avatar height in pixels
1322
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1414
1323
  #: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:689
1324
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1285
1325
- #: bp-members/classes/class-bp-rest-members-endpoint.php:944
1326
  msgid "Avatar URL with full image size (%1$d x %2$d pixels)."
1327
  msgstr ""
1328
 
1329
  #. translators: 1: Thumb avatar width in pixels. 2: Thumb avatar height in pixels
1330
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1422
1331
  #: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:697
1332
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1293
1333
- #: bp-members/classes/class-bp-rest-members-endpoint.php:952
1334
  msgid "Avatar URL with thumb image size (%1$d x %2$d pixels)."
1335
  msgstr ""
1336
 
1337
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1429
1338
  msgid "Avatar URLs for the author of the activity."
1339
  msgstr ""
1340
 
1341
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1456
1342
- #: bp-members/classes/class-bp-rest-members-endpoint.php:1029
1343
  msgid "Ensure result set excludes specific IDs."
1344
  msgstr ""
1345
 
1346
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1465
1347
  #: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:742
1348
- #: bp-members/classes/class-bp-rest-members-endpoint.php:1020
1349
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:1026
1350
  msgid "Ensure result set includes specific IDs."
1351
  msgstr ""
1352
 
1353
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1474
1354
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1337
1355
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:1044
1356
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:834
1357
  msgid "Order sort attribute ascending or descending."
1358
  msgstr ""
1359
 
1360
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1483
1361
  msgid "Limit result set to items published after a given ISO8601 compliant date."
1362
  msgstr ""
1363
 
1364
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1490
1365
  msgid "Limit result set to items created by a specific user (ID)."
1366
  msgstr ""
1367
 
1368
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1498
1369
  #: bp-core/classes/class-bp-rest-components-endpoint.php:480
1370
  msgid "Limit result set to items with a specific status."
1371
  msgstr ""
1372
 
1373
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1507
1374
  msgid "Limit result set to items with a specific scope."
1375
  msgstr ""
1376
 
1377
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1515
1378
  msgid "Limit result set to items created by a specific group."
1379
  msgstr ""
1380
 
1381
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1523
1382
  msgid "Limit result set to items created by a specific site."
1383
  msgstr ""
1384
 
1385
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1531
1386
  msgid "Limit result set to items with a specific prime association ID."
1387
  msgstr ""
1388
 
1389
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1539
1390
  msgid "Limit result set to items with a specific secondary association ID."
1391
  msgstr ""
1392
 
1393
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1547
1394
  msgid "Limit result set to items with a specific active BuddyPress component."
1395
  msgstr ""
1396
 
1397
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1555
1398
  msgid "Limit result set to items with a specific activity type."
1399
  msgstr ""
1400
 
1401
- #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1566
1402
  msgid "No comments by default, stream for within stream display, threaded for below each activity item."
1403
  msgstr ""
1404
 
@@ -1701,51 +1698,76 @@ msgstr ""
1701
  msgid "Sorry, there was a problem fetching the blog avatar."
1702
  msgstr ""
1703
 
1704
- #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:173
1705
- #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:178
1706
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:211
1707
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:461
1708
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:328
1709
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:488
1710
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:625
1711
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:207
1712
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:449
1713
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:275
1714
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:484
1715
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:588
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1716
  msgid "Invalid group ID."
1717
  msgstr ""
1718
 
1719
- #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:183
1720
  msgid "Sorry, blog avatar is disabled."
1721
  msgstr ""
1722
 
1723
- #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:248
1724
- #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:439
1725
- #: bp-groups/classes/class-bp-rest-attachments-group-cover-endpoint.php:415
1726
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:445
1727
- #: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:415
1728
  msgid "Full size of the image file."
1729
  msgstr ""
1730
 
1731
- #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:255
1732
- #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:445
1733
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:452
1734
  msgid "Thumb size of the image file."
1735
  msgstr ""
1736
 
1737
- #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:286
1738
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:483
1739
  msgid "Whether to return an <img> HTML element, vs a raw URL to an avatar."
1740
  msgstr ""
1741
 
1742
- #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:294
1743
- #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:483
1744
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:491
1745
  msgid "The alt attribute for the <img> element."
1746
  msgstr ""
1747
 
1748
- #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:302
1749
  msgid "Whether to disable the default Gravatar Admin user fallback."
1750
  msgstr ""
1751
 
@@ -1766,13 +1788,7 @@ msgstr ""
1766
  msgid "There was a problem creating blog."
1767
  msgstr ""
1768
 
1769
- #: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:368
1770
- #: bp-core/classes/class-bp-rest-components-endpoint.php:167
1771
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:188
1772
- msgid "Sorry, you are not allowed to perform this action."
1773
- msgstr ""
1774
-
1775
- #: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:378
1776
  msgid "Sorry, blog creation is disabled."
1777
  msgstr ""
1778
 
@@ -3781,7 +3797,7 @@ msgstr ""
3781
 
3782
  #: bp-core/bp-core-template.php:3145
3783
  #: bp-groups/bp-groups-template.php:3557
3784
- #: bp-templates/bp-nouveau/includes/groups/functions.php:551
3785
  msgid "Create a Group"
3786
  msgstr ""
3787
 
@@ -3811,25 +3827,25 @@ msgctxt "component directory title"
3811
  msgid "Members"
3812
  msgstr ""
3813
 
3814
- #: bp-core/classes/class-bp-admin-types.php:320
3815
- #: bp-core/classes/class-bp-admin-types.php:494
3816
  msgid "Type ID"
3817
  msgstr ""
3818
 
3819
- #: bp-core/classes/class-bp-admin-types.php:321
3820
  msgid "Enter a lower-case string without spaces or special characters (used internally to identify the type)."
3821
  msgstr ""
3822
 
3823
- #: bp-core/classes/class-bp-admin-types.php:363
3824
  msgid "Type metadata labels need to be set into the labels argument when registering your taxonomy using the meta key as the label’s key."
3825
  msgstr ""
3826
 
3827
  #. translators: %s is the name of the Type meta key
3828
- #: bp-core/classes/class-bp-admin-types.php:367
3829
  msgid "As a result, the form elements for the \"%s\" meta key cannot be displayed"
3830
  msgstr ""
3831
 
3832
- #: bp-core/classes/class-bp-admin-types.php:499
3833
  #: bp-core/deprecated/1.5.php:153
3834
  #: bp-members/classes/class-bp-members-list-table.php:151
3835
  #: bp-members/classes/class-bp-members-ms-list-table.php:138
@@ -3838,7 +3854,7 @@ msgstr ""
3838
  msgid "Name"
3839
  msgstr ""
3840
 
3841
- #: bp-core/classes/class-bp-admin-types.php:500
3842
  msgctxt "Number/count of types"
3843
  msgid "Count"
3844
  msgstr ""
@@ -5226,23 +5242,22 @@ msgstr ""
5226
  #: bp-friends/classes/class-bp-rest-friends-endpoint.php:132
5227
  #: bp-friends/classes/class-bp-rest-friends-endpoint.php:213
5228
  #: bp-friends/classes/class-bp-rest-friends-endpoint.php:305
5229
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:427
5230
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:522
5231
  msgid "There was a problem confirming if user is valid."
5232
  msgstr ""
5233
 
5234
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:180
5235
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:271
5236
- #: bp-groups/classes/class-bp-rest-attachments-group-cover-endpoint.php:341
5237
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:261
5238
- #: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:340
5239
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:190
5240
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:267
5241
  msgid "Sorry, you need to be logged in to perform this action."
5242
  msgstr ""
5243
 
5244
  #: bp-friends/classes/class-bp-rest-friends-endpoint.php:228
5245
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:361
5246
  msgid "Friendship does not exist."
5247
  msgstr ""
5248
 
@@ -5250,76 +5265,76 @@ msgstr ""
5250
  msgid "Those users are already friends or have sent friendship request(s) recently."
5251
  msgstr ""
5252
 
5253
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:329
5254
  #: bp-templates/bp-nouveau/includes/groups/functions.php:495
5255
  msgid "You are not allowed to perform this action."
5256
  msgstr ""
5257
 
5258
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:346
5259
  msgid "There was an error trying to create the friendship."
5260
  msgstr ""
5261
 
5262
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:442
5263
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:537
5264
  msgid "Invalid friendship ID."
5265
  msgstr ""
5266
 
5267
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:453
5268
  msgid "Could not accept friendship."
5269
  msgstr ""
5270
 
5271
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:571
5272
  msgid "Could not delete friendship."
5273
  msgstr ""
5274
 
5275
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:726
5276
  msgid "A unique numeric ID of a user."
5277
  msgstr ""
5278
 
5279
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:745
5280
  msgid "Whether to force the friendship agreement."
5281
  msgstr ""
5282
 
5283
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:757
5284
  msgid "Whether to force friendship removal."
5285
  msgstr ""
5286
 
5287
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:817
5288
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:887
5289
  msgid "Unique numeric identifier of the friendship."
5290
  msgstr ""
5291
 
5292
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:822
5293
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:895
5294
  msgid "The ID of the user who is requesting the Friendship."
5295
  msgstr ""
5296
 
5297
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:827
5298
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:903
5299
  msgid "The ID of the user who is invited to agree to the Friendship request."
5300
  msgstr ""
5301
 
5302
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:832
5303
  msgid "Whether the friendship been confirmed/accepted."
5304
  msgstr ""
5305
 
5306
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:838
5307
  msgid "The date the friendship was created, in the site's timezone."
5308
  msgstr ""
5309
 
5310
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:870
5311
  msgid "ID of the member whose friendships are being retrieved."
5312
  msgstr ""
5313
 
5314
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:879
5315
  msgid "Wether the friendship has been accepted."
5316
  msgstr ""
5317
 
5318
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:911
5319
  msgid "Column name to order the results by."
5320
  msgstr ""
5321
 
5322
- #: bp-friends/classes/class-bp-rest-friends-endpoint.php:920
5323
  msgid "Order results ascending or descending."
5324
  msgstr ""
5325
 
@@ -5356,7 +5371,7 @@ msgid "You are not an admin of this group."
5356
  msgstr ""
5357
 
5358
  #: bp-groups/actions/create.php:27
5359
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:387
5360
  msgid "Sorry, you are not allowed to create groups."
5361
  msgstr ""
5362
 
@@ -6574,7 +6589,7 @@ msgstr ""
6574
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:24
6575
  #: bp-templates/bp-legacy/buddypress/members/single/groups.php:25
6576
  #: bp-templates/bp-nouveau/includes/blogs/functions.php:108
6577
- #: bp-templates/bp-nouveau/includes/groups/functions.php:609
6578
  #: bp-templates/bp-nouveau/includes/members/functions.php:102
6579
  #: bp-templates/bp-nouveau/includes/members/functions.php:120
6580
  msgid "Alphabetical"
@@ -6955,7 +6970,7 @@ msgstr ""
6955
  #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:63
6956
  #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:89
6957
  #: bp-groups/classes/class-bp-rest-groups-endpoint.php:60
6958
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1145
6959
  msgid "A unique numeric ID for the Group."
6960
  msgstr ""
6961
 
@@ -6970,28 +6985,24 @@ msgstr ""
6970
  msgid "Sorry, you need an image file to upload."
6971
  msgstr ""
6972
 
6973
- #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:262
6974
  msgid "Sorry, group avatar upload is disabled."
6975
  msgstr ""
6976
 
6977
- #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:275
6978
- #: bp-groups/classes/class-bp-rest-attachments-group-cover-endpoint.php:351
6979
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:281
6980
- #: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:350
6981
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:200
6982
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:287
6983
  msgid "Sorry, you are not authorized to perform this action."
6984
  msgstr ""
6985
 
6986
- #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:308
6987
  msgid "Sorry, there are no uploaded avatars for this group on this site."
6988
  msgstr ""
6989
 
6990
- #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:341
6991
  msgid "Sorry, there was a problem deleting this group avatar."
6992
  msgstr ""
6993
 
6994
- #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:475
6995
  msgid "Whether to return an <img> HTML element, vs a raw URL to a group avatar."
6996
  msgstr ""
6997
 
@@ -6999,7 +7010,7 @@ msgstr ""
6999
  msgid "Sorry, there was a problem fetching this group cover."
7000
  msgstr ""
7001
 
7002
- #: bp-groups/classes/class-bp-rest-attachments-group-cover-endpoint.php:164
7003
  msgid "Invalid group id."
7004
  msgstr ""
7005
 
@@ -7015,132 +7026,134 @@ msgstr ""
7015
  msgid "A unique numeric ID for the group invitation."
7016
  msgstr ""
7017
 
7018
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:200
7019
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:321
7020
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:565
7021
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:690
 
 
 
 
7022
  msgid "Sorry, you need to be logged in to see the group invitations."
7023
  msgstr ""
7024
 
7025
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:222
7026
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:233
7027
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:471
 
7028
  #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:218
7029
  #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:438
7030
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:169
7031
- #: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:159
7032
- #: bp-members/classes/class-bp-rest-members-endpoint.php:239
7033
- #: bp-members/classes/class-bp-rest-members-endpoint.php:316
7034
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:200
7035
- #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:154
7036
- #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:292
7037
  msgid "Invalid member ID."
7038
  msgstr ""
7039
 
7040
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:257
7041
- msgid "Sorry, you are not allowed to fetch group invitations with those arguments."
7042
- msgstr ""
7043
-
7044
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:331
7045
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:575
7046
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:700
7047
  msgid "Invalid group invitation ID."
7048
  msgstr ""
7049
 
7050
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:351
7051
  msgid "Sorry, you are not allowed to fetch an invitation."
7052
  msgstr ""
7053
 
7054
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:396
7055
  msgid "Could not invite member to the group."
7056
  msgstr ""
7057
 
7058
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:451
7059
  msgid "Sorry, you need to be logged in to create an invitation."
7060
  msgstr ""
7061
 
7062
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:482
 
7063
  msgid "Sorry, you are not allowed to create the invitation as requested."
7064
  msgstr ""
7065
 
7066
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:516
7067
  msgid "Could not accept group invitation."
7068
  msgstr ""
7069
 
7070
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:588
7071
  msgid "Sorry, you are not allowed to accept the invitation as requested."
7072
  msgstr ""
7073
 
7074
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:640
7075
  msgid "Could not delete group invitation."
7076
  msgstr ""
7077
 
7078
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:715
7079
  msgid "Sorry, you are not allowed to delete the invitation as requested."
7080
  msgstr ""
7081
 
7082
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:861
7083
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:826
7084
  msgid "The optional message to send to the invited user."
7085
  msgstr ""
7086
 
7087
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:870
7088
  msgid "Whether the invite should be sent to the invitee."
7089
  msgstr ""
7090
 
7091
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:906
7092
  msgid "A unique numeric ID for the BP Invitation object."
7093
  msgstr ""
7094
 
7095
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:912
7096
  msgid "The ID of the user who is invited to join the Group."
7097
  msgstr ""
7098
 
7099
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:917
7100
  msgid "Whether the invite has been sent to the invitee."
7101
  msgstr ""
7102
 
7103
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:922
7104
  msgid "The ID of the user who made the invite."
7105
  msgstr ""
7106
 
7107
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:927
7108
  msgid "The ID of the group to which the user has been invited."
7109
  msgstr ""
7110
 
7111
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:932
7112
  msgid "The date the object was created or last updated, in the site's timezone."
7113
  msgstr ""
7114
 
7115
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:938
7116
  msgid "Invitation or request."
7117
  msgstr ""
7118
 
7119
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:945
7120
  msgid "The raw and rendered versions for the content of the message."
7121
  msgstr ""
7122
 
7123
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:953
7124
  msgid "Content for the object, as it exists in the database."
7125
  msgstr ""
7126
 
7127
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:958
7128
  msgid "HTML content for the object, transformed for display."
7129
  msgstr ""
7130
 
7131
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:992
7132
  msgid "ID of the group to limit results to."
7133
  msgstr ""
7134
 
7135
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:1001
7136
  msgid "Return only invitations extended to this user."
7137
  msgstr ""
7138
 
7139
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:1010
7140
  msgid "Return only invitations extended by this user."
7141
  msgstr ""
7142
 
7143
- #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:1019
7144
  msgid "Limit result set to invites that have been sent, not sent, or include all."
7145
  msgstr ""
7146
 
@@ -7148,125 +7161,128 @@ msgstr ""
7148
  msgid "A unique numeric ID for the Group Member."
7149
  msgstr ""
7150
 
7151
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:223
7152
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:351
 
 
 
 
 
7153
  msgid "Could not join the group."
7154
  msgstr ""
7155
 
7156
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:248
7157
  msgid "Could not add member to the group."
7158
  msgstr ""
7159
 
7160
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:305
7161
  msgid "Sorry, you need to be logged in to join a group."
7162
  msgstr ""
7163
 
7164
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:317
7165
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:477
7166
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:614
7167
  msgid "Invalid group member ID."
7168
  msgstr ""
7169
 
7170
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:390
7171
  msgid "Could not promote member."
7172
  msgstr ""
7173
 
7174
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:400
7175
  msgid "Could not demote member."
7176
  msgstr ""
7177
 
7178
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:409
7179
  msgid "Could not demote member from the group."
7180
  msgstr ""
7181
 
7182
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:410
7183
  msgid "Could not ban member from the group."
7184
  msgstr ""
7185
 
7186
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:411
7187
  msgid "Could not unban member from the group."
7188
  msgstr ""
7189
 
7190
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:465
7191
  #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:546
7192
  msgid "Sorry, you need to be logged in to make an update."
7193
  msgstr ""
7194
 
7195
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:504
7196
  msgid "Sorry, you are not allowed to ban this group member."
7197
  msgstr ""
7198
 
7199
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:505
7200
  msgid "Sorry, you are not allowed to unban this group member."
7201
  msgstr ""
7202
 
7203
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:506
7204
  msgid "Sorry, you are not allowed to promote this group member."
7205
  msgstr ""
7206
 
7207
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:507
7208
  msgid "Sorry, you are not allowed to demote this group member."
7209
  msgstr ""
7210
 
7211
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:553
7212
  msgid "Could not remove member from this group."
7213
  msgstr ""
7214
 
7215
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:602
7216
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:643
7217
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:659
7218
  msgid "Sorry, you need to be logged in to view a group membership."
7219
  msgstr ""
7220
 
7221
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:778
7222
  msgid "Group role to assign the user to."
7223
  msgstr ""
7224
 
7225
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:792
7226
  msgid "A unique numeric ID for the Member to add to the Group."
7227
  msgstr ""
7228
 
7229
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:803
7230
  msgid "Action used to update a group member."
7231
  msgstr ""
7232
 
7233
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:843
7234
  msgid "Whether the member is a group moderator."
7235
  msgstr ""
7236
 
7237
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:849
7238
  msgid "Whether the member has been banned from the group."
7239
  msgstr ""
7240
 
7241
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:855
7242
  msgid "Whether the member is a group administrator."
7243
  msgstr ""
7244
 
7245
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:861
7246
  msgid "Whether the membership of this user has been confirmed."
7247
  msgstr ""
7248
 
7249
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:867
7250
  msgid "The date of the last time the membership of this user was modified, in the site's timezone."
7251
  msgstr ""
7252
 
7253
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:897
7254
  msgid "Sort the order of results by the status of the group members."
7255
  msgstr ""
7256
 
7257
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:906
7258
  msgid "Ensure result set includes specific group roles."
7259
  msgstr ""
7260
 
7261
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:918
7262
  msgid "Ensure result set excludes specific member IDs."
7263
  msgstr ""
7264
 
7265
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:927
7266
  msgid "Whether results should exclude group admins and mods."
7267
  msgstr ""
7268
 
7269
- #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:935
7270
  msgid "Whether results should exclude banned group members."
7271
  msgstr ""
7272
 
@@ -7274,74 +7290,74 @@ msgstr ""
7274
  msgid "A unique numeric ID for the group membership request."
7275
  msgstr ""
7276
 
7277
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:196
7278
  msgid "Sorry, you need to be logged in to view membership requests."
7279
  msgstr ""
7280
 
7281
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:232
7282
  msgid "Sorry, you are not allowed to view membership requests."
7283
  msgstr ""
7284
 
7285
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:296
7286
  msgid "Sorry, you need to be logged in to get a membership."
7287
  msgstr ""
7288
 
7289
  #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:306
7290
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:556
7291
  #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:682
7292
  msgid "Invalid group membership request ID."
7293
  msgstr ""
7294
 
7295
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:319
7296
  msgid "Sorry, you are not allowed to view a membership request."
7297
  msgstr ""
7298
 
7299
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:354
7300
  msgid "There is already a request to this member."
7301
  msgstr ""
7302
 
7303
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:372
7304
  msgid "Could not send membership request to this group."
7305
  msgstr ""
7306
 
7307
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:427
7308
  msgid "Sorry, you need to be logged in to create a membership request."
7309
  msgstr ""
7310
 
7311
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:462
7312
  msgid "User may not extend requests on behalf of another user."
7313
  msgstr ""
7314
 
7315
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:494
7316
  msgid "There was an error accepting the membership request."
7317
  msgstr ""
7318
 
7319
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:568
7320
  msgid "User is not allowed to approve membership requests to this group."
7321
  msgstr ""
7322
 
7323
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:622
7324
  msgid "There was an error rejecting the membership request."
7325
  msgstr ""
7326
 
7327
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:672
7328
  msgid "Sorry, you need to be logged in to delete a request."
7329
  msgstr ""
7330
 
7331
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:695
7332
  msgid "User is not allowed to delete this membership request."
7333
  msgstr ""
7334
 
7335
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:866
7336
  msgid "The ID of the user who requested a Group membership."
7337
  msgstr ""
7338
 
7339
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:867
7340
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:894
7341
  msgid "The ID of the group the user requested a membership for."
7342
  msgstr ""
7343
 
7344
- #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:893
7345
  msgid "Return only Membership requests made by a specific user."
7346
  msgstr ""
7347
 
@@ -7353,177 +7369,173 @@ msgstr ""
7353
  msgid "The maximum amount of groups the user is member of to return. Defaults to all groups."
7354
  msgstr ""
7355
 
7356
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:285
7357
- msgid "Sorry, you cannot view the group."
7358
- msgstr ""
7359
-
7360
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:320
7361
  msgid "Please, enter the name of group."
7362
  msgstr ""
7363
 
7364
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:332
7365
  msgid "Cannot create new group."
7366
  msgstr ""
7367
 
7368
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:422
7369
  msgid "Cannot update existing group."
7370
  msgstr ""
7371
 
7372
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:472
7373
- msgid "Sorry, you need to be logged in to update this group."
7374
  msgstr ""
7375
 
7376
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:495
7377
- msgid "Sorry, you are not allowed to update this group."
7378
  msgstr ""
7379
 
7380
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:532
7381
  msgid "Could not delete the group."
7382
  msgstr ""
7383
 
7384
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:576
7385
- msgid "Sorry, you need to be logged in to delete this group."
7386
  msgstr ""
7387
 
7388
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:598
7389
- msgid "Sorry, you are not allowed to delete this group."
7390
  msgstr ""
7391
 
7392
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:631
7393
  msgid "Invalid user ID."
7394
  msgstr ""
7395
 
7396
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:704
7397
  msgid "Sorry, you need to be logged in to view your groups."
7398
  msgstr ""
7399
 
7400
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1086
7401
  msgid "Assign one or more type to a group. To assign more than one type, use a comma separated list of types."
7402
  msgstr ""
7403
 
7404
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1099
7405
  msgid "Append one or more type to a group. To append more than one type, use a comma separated list of types."
7406
  msgstr ""
7407
 
7408
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1108
7409
  msgid "Remove one or more type of a group. To remove more than one type, use a comma separated list of types."
7410
  msgstr ""
7411
 
7412
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1151
7413
  msgid "The ID of the user who created the Group."
7414
  msgstr ""
7415
 
7416
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1157
7417
  msgid "The name of the Group."
7418
  msgstr ""
7419
 
7420
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1166
7421
  msgid "The URL-friendly slug for the Group."
7422
  msgstr ""
7423
 
7424
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1174
7425
  msgid "The permalink to the Group on the site."
7426
  msgstr ""
7427
 
7428
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1181
7429
  msgid "The description of the Group."
7430
  msgstr ""
7431
 
7432
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1190
7433
  msgid "Content for the description of the Group, as it exists in the database."
7434
  msgstr ""
7435
 
7436
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1195
7437
  msgid "HTML content for the description of the Group, transformed for display."
7438
  msgstr ""
7439
 
7440
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1204
7441
  msgid "The status of the Group."
7442
  msgstr ""
7443
 
7444
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1214
7445
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1420
7446
  msgid "Whether the Group has a forum enabled or not."
7447
  msgstr ""
7448
 
7449
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1219
7450
  msgid "ID of the parent Group."
7451
  msgstr ""
7452
 
7453
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1224
7454
  msgid "The date the Group was created, in the site's timezone."
7455
  msgstr ""
7456
 
7457
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1231
7458
  msgid "The type(s) of the Group."
7459
  msgstr ""
7460
 
7461
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1241
7462
  msgid "Group administrators."
7463
  msgstr ""
7464
 
7465
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1250
7466
  msgid "Group moderators."
7467
  msgstr ""
7468
 
7469
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1259
7470
  msgid "Count of all Group members."
7471
  msgstr ""
7472
 
7473
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1265
7474
  msgid "The date the Group was last active, in the site's timezone."
7475
  msgstr ""
7476
 
7477
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1272
7478
  msgid "The human diff time the Group was last active, in the site's timezone."
7479
  msgstr ""
7480
 
7481
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1300
7482
  msgid "Avatar URLs for the group."
7483
  msgstr ""
7484
 
7485
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1328
7486
- #: bp-members/classes/class-bp-rest-members-endpoint.php:994
7487
  msgid "Shorthand for certain orderby/order combinations."
7488
  msgstr ""
7489
 
7490
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1346
7491
  msgid "Order Groups by which attribute."
7492
  msgstr ""
7493
 
7494
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1355
7495
  msgid "Group statuses to limit results to."
7496
  msgstr ""
7497
 
7498
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1367
7499
  msgid "Pass a user_id to limit to only Groups that this user is a member of."
7500
  msgstr ""
7501
 
7502
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1375
7503
  msgid "Get Groups that are children of the specified Group(s) IDs."
7504
  msgstr ""
7505
 
7506
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1385
7507
  msgid "Get Groups based on their meta data information."
7508
  msgstr ""
7509
 
7510
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1393
7511
  msgid "Ensure result set includes Groups with specific IDs."
7512
  msgstr ""
7513
 
7514
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1402
7515
  msgid "Ensure result set excludes Groups with specific IDs"
7516
  msgstr ""
7517
 
7518
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1411
7519
  msgid "Limit results set to a certain Group type."
7520
  msgstr ""
7521
 
7522
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1428
7523
  msgid "Whether results should include hidden Groups."
7524
  msgstr ""
7525
 
7526
- #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1436
7527
  msgid "Whether to fetch extra BP data about the returned groups."
7528
  msgstr ""
7529
 
@@ -7846,7 +7858,7 @@ msgstr ""
7846
 
7847
  #: bp-members/bp-members-functions.php:2022
7848
  #: bp-members/bp-members-functions.php:2049
7849
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:666
7850
  msgid "Invalid activation key."
7851
  msgstr ""
7852
 
@@ -8654,7 +8666,7 @@ msgid "Account Activated"
8654
  msgstr ""
8655
 
8656
  #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:70
8657
- #: bp-members/classes/class-bp-rest-members-endpoint.php:786
8658
  msgid "A unique numeric ID for the Member."
8659
  msgstr ""
8660
 
@@ -8662,19 +8674,19 @@ msgstr ""
8662
  msgid "Sorry, there was a problem fetching the avatar."
8663
  msgstr ""
8664
 
8665
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:271
8666
  msgid "Sorry, member avatar upload is disabled."
8667
  msgstr ""
8668
 
8669
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:314
8670
  msgid "Sorry, there are no uploaded avatars for this user on this site."
8671
  msgstr ""
8672
 
8673
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:347
8674
  msgid "Sorry, there was a problem deleting the avatar."
8675
  msgstr ""
8676
 
8677
- #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:499
8678
  msgid "Whether to disable the default Gravatar fallback."
8679
  msgstr ""
8680
 
@@ -8710,126 +8722,125 @@ msgstr ""
8710
  msgid "Reassign the deleted member's posts and links to this user ID."
8711
  msgstr ""
8712
 
8713
- #: bp-members/classes/class-bp-rest-members-endpoint.php:251
8714
  msgid "Sorry, you are not allowed to view members with the edit context."
8715
  msgstr ""
8716
 
8717
- #: bp-members/classes/class-bp-rest-members-endpoint.php:283
8718
- #: bp-members/classes/class-bp-rest-members-endpoint.php:331
8719
  msgid "Sorry, you are not allowed to view members."
8720
  msgstr ""
8721
 
8722
  #. translators: %s: transport method name
8723
- #: bp-members/classes/class-bp-rest-members-endpoint.php:385
8724
  msgid "'%s' Transport Method not implemented."
8725
  msgstr ""
8726
 
8727
  #. translators: %s: transport method name
8728
- #: bp-members/classes/class-bp-rest-members-endpoint.php:406
8729
  msgid "'%s' Transport method not implemented."
8730
  msgstr ""
8731
 
8732
- #: bp-members/classes/class-bp-rest-members-endpoint.php:656
8733
  msgid "No extended profile data available as the component is inactive"
8734
  msgstr ""
8735
 
8736
- #: bp-members/classes/class-bp-rest-members-endpoint.php:697
8737
  msgid "The data for the user was not found."
8738
  msgstr ""
8739
 
8740
- #: bp-members/classes/class-bp-rest-members-endpoint.php:721
8741
  msgid "Assign a member type to a member, use a comma separated list of member types to assign more than one."
8742
  msgstr ""
8743
 
8744
- #: bp-members/classes/class-bp-rest-members-endpoint.php:740
8745
  msgid "The email address for the member."
8746
  msgstr ""
8747
 
8748
- #: bp-members/classes/class-bp-rest-members-endpoint.php:792
8749
  msgid "Display name for the member."
8750
  msgstr ""
8751
 
8752
- #: bp-members/classes/class-bp-rest-members-endpoint.php:800
8753
  msgid "The name used for that user in @-mentions."
8754
  msgstr ""
8755
 
8756
- #: bp-members/classes/class-bp-rest-members-endpoint.php:809
8757
  msgid "Profile URL of the member."
8758
  msgstr ""
8759
 
8760
- #: bp-members/classes/class-bp-rest-members-endpoint.php:816
8761
  msgid "An alphanumeric identifier for the Member."
8762
  msgstr ""
8763
 
8764
- #: bp-members/classes/class-bp-rest-members-endpoint.php:825
8765
  msgid "Member types associated with the member."
8766
  msgstr ""
8767
 
8768
- #: bp-members/classes/class-bp-rest-members-endpoint.php:835
8769
  msgid "Registration date for the member."
8770
  msgstr ""
8771
 
8772
- #: bp-members/classes/class-bp-rest-members-endpoint.php:842
8773
  msgid "Password for the member (never included)."
8774
  msgstr ""
8775
 
8776
- #: bp-members/classes/class-bp-rest-members-endpoint.php:851
8777
  msgid "Roles assigned to the member."
8778
  msgstr ""
8779
 
8780
- #: bp-members/classes/class-bp-rest-members-endpoint.php:859
8781
  msgid "All capabilities assigned to the user."
8782
  msgstr ""
8783
 
8784
- #: bp-members/classes/class-bp-rest-members-endpoint.php:865
8785
  msgid "Any extra capabilities assigned to the user."
8786
  msgstr ""
8787
 
8788
- #: bp-members/classes/class-bp-rest-members-endpoint.php:871
8789
  msgid "Member XProfile groups and its fields."
8790
  msgstr ""
8791
 
8792
- #: bp-members/classes/class-bp-rest-members-endpoint.php:877
8793
  msgid "Friendship relation with, current, logged in user."
8794
  msgstr ""
8795
 
8796
- #: bp-members/classes/class-bp-rest-members-endpoint.php:883
8797
  msgid "Slug of the friendship status with current logged in user."
8798
  msgstr ""
8799
 
8800
- #: bp-members/classes/class-bp-rest-members-endpoint.php:890
8801
  msgid "Last date the member was active on the site."
8802
  msgstr ""
8803
 
8804
- #: bp-members/classes/class-bp-rest-members-endpoint.php:906
8805
  msgid "The content of the latest activity posted by the member."
8806
  msgstr ""
8807
 
8808
- #: bp-members/classes/class-bp-rest-members-endpoint.php:931
8809
  msgid "Total number of friends for the member."
8810
  msgstr ""
8811
 
8812
- #: bp-members/classes/class-bp-rest-members-endpoint.php:959
8813
  msgid "Avatar URLs for the member."
8814
  msgstr ""
8815
 
8816
- #: bp-members/classes/class-bp-rest-members-endpoint.php:1003
8817
  msgid "Limit results to friends of a user."
8818
  msgstr ""
8819
 
8820
- #: bp-members/classes/class-bp-rest-members-endpoint.php:1011
8821
  msgid "Pass IDs of users to limit result set."
8822
  msgstr ""
8823
 
8824
- #: bp-members/classes/class-bp-rest-members-endpoint.php:1038
8825
  msgid "Whether to fetch extra BP data about the returned members."
8826
  msgstr ""
8827
 
8828
- #: bp-members/classes/class-bp-rest-members-endpoint.php:1046
8829
  msgid "Limit results set to certain type(s)."
8830
  msgstr ""
8831
 
8832
- #: bp-members/classes/class-bp-rest-members-endpoint.php:1055
8833
  msgid "Limit results set to a certain XProfile field."
8834
  msgstr ""
8835
 
@@ -8838,96 +8849,96 @@ msgid "Identifier for the signup. Can be a signup ID, an email address, or an ac
8838
  msgstr ""
8839
 
8840
  #: bp-members/classes/class-bp-rest-signup-endpoint.php:99
8841
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:906
8842
  msgid "Activation key of the signup."
8843
  msgstr ""
8844
 
8845
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:277
8846
  msgid "Invalid signup id."
8847
  msgstr ""
8848
 
8849
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:447
8850
  msgid "Cannot create new signup."
8851
  msgstr ""
8852
 
8853
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:545
8854
  msgid "Could not delete signup."
8855
  msgstr ""
8856
 
8857
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:618
8858
  msgid "Fail to activate the signup."
8859
  msgstr ""
8860
 
8861
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:794
8862
  msgid "Passwords cannot be empty or contain the \"\\\" character."
8863
  msgstr ""
8864
 
8865
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:845
8866
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:936
8867
  msgid "Password for the new user (never included)."
8868
  msgstr ""
8869
 
8870
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:888
8871
  msgid "A unique numeric ID for the signup."
8872
  msgstr ""
8873
 
8874
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:894
8875
  msgid "The username of the user the signup is for."
8876
  msgstr ""
8877
 
8878
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:900
8879
  msgid "The email for the user the signup is for."
8880
  msgstr ""
8881
 
8882
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:912
8883
  msgid "The registered date for the user, in the site's timezone."
8884
  msgstr ""
8885
 
8886
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:919
8887
  msgid "The date the activation email was sent to the user, in the site's timezone."
8888
  msgstr ""
8889
 
8890
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:925
8891
  msgid "The number of times the activation email was sent to the user."
8892
  msgstr ""
8893
 
8894
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:932
8895
  msgid "The signup meta information"
8896
  msgstr ""
8897
 
8898
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:948
8899
  msgid "The new user's full name."
8900
  msgstr ""
8901
 
8902
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:960
8903
  msgid "Unique site name (slug) of the new user's child site."
8904
  msgstr ""
8905
 
8906
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:967
8907
  msgid "Title of the new user's child site."
8908
  msgstr ""
8909
 
8910
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:974
8911
  msgid "Search engine visibility of the new user's site."
8912
  msgstr ""
8913
 
8914
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:981
8915
  msgid "Language to use for the new user's site."
8916
  msgstr ""
8917
 
8918
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:1010
8919
  msgid "Total number of signups to return."
8920
  msgstr ""
8921
 
8922
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:1018
8923
  msgid "Offset the result set by a specific number of items."
8924
  msgstr ""
8925
 
8926
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:1035
8927
  msgid "Order by a specific parameter (default: signup_id)."
8928
  msgstr ""
8929
 
8930
- #: bp-members/classes/class-bp-rest-signup-endpoint.php:1053
8931
  msgid "Specific user login to return."
8932
  msgstr ""
8933
 
@@ -9468,24 +9479,23 @@ msgstr ""
9468
  msgid "ID of one of the message of the Thread."
9469
  msgstr ""
9470
 
9471
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:210
9472
  msgid "Sorry, you cannot view the messages."
9473
  msgstr ""
9474
 
9475
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:275
9476
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:301
9477
  msgid "Sorry, you are not allowed to see this thread."
9478
  msgstr ""
9479
 
9480
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:287
9481
  msgid "Sorry, this thread does not exist."
9482
  msgstr ""
9483
 
9484
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:343
9485
  msgid "There was an error trying to create the message."
9486
  msgstr ""
9487
 
9488
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:396
9489
  msgid "Sorry, you need to be logged in to create a message."
9490
  msgstr ""
9491
 
@@ -9505,127 +9515,127 @@ msgstr ""
9505
  msgid "Sorry, you cannot remove the message from your starred box."
9506
  msgstr ""
9507
 
9508
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:609
9509
  msgid "Sorry, you are not allowed to star/unstar messages."
9510
  msgstr ""
9511
 
9512
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:655
9513
  msgid "There was an error trying to delete the thread."
9514
  msgstr ""
9515
 
9516
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1012
9517
  msgid "ID of the Messages Thread."
9518
  msgstr ""
9519
 
9520
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1018
9521
  msgid "ID of the Messages Thread. Required when replying to an existing Thread."
9522
  msgstr ""
9523
 
9524
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1023
9525
  msgid "The user ID of the Message sender."
9526
  msgstr ""
9527
 
9528
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1034
9529
  msgid "Subject of the Message initializing the Thread."
9530
  msgstr ""
9531
 
9532
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1038
9533
  msgid "Content of the Message to add to the Thread."
9534
  msgstr ""
9535
 
9536
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1045
9537
  msgid "The list of the recipients user IDs of the Message."
9538
  msgstr ""
9539
 
9540
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1057
9541
  msgid "By default the latest message of the thread will be updated. Specify this message ID to edit another message of the thread."
9542
  msgstr ""
9543
 
9544
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1069
9545
  msgid "The user ID to remove from the thread"
9546
  msgstr ""
9547
 
9548
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1105
9549
  msgid "A unique numeric ID for the Thread."
9550
  msgstr ""
9551
 
9552
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1110
9553
  msgid "The ID of the latest message of the Thread."
9554
  msgstr ""
9555
 
9556
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1116
9557
  msgid "The ID of latest sender of the Thread."
9558
  msgstr ""
9559
 
9560
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1122
9561
  msgid "Title of the latest message of the Thread."
9562
  msgstr ""
9563
 
9564
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1130
9565
  msgid "Title of the latest message of the Thread, as it exists in the database."
9566
  msgstr ""
9567
 
9568
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1136
9569
  msgid "Title of the latest message of the Thread, transformed for display."
9570
  msgstr ""
9571
 
9572
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1146
9573
  msgid "Summary of the latest message of the Thread."
9574
  msgstr ""
9575
 
9576
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1155
9577
  msgid "Summary for the latest message of the Thread, as it exists in the database."
9578
  msgstr ""
9579
 
9580
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1160
9581
  msgid "HTML summary for the latest message of the Thread, transformed for display."
9582
  msgstr ""
9583
 
9584
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1168
9585
  msgid "Content of the latest message of the Thread."
9586
  msgstr ""
9587
 
9588
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1177
9589
  msgid "Content for the latest message of the Thread, as it exists in the database."
9590
  msgstr ""
9591
 
9592
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1182
9593
  msgid "HTML content for the latest message of the Thread, transformed for display."
9594
  msgstr ""
9595
 
9596
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1191
9597
  msgid "The date the latest message of the Thread, in the site's timezone."
9598
  msgstr ""
9599
 
9600
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1198
9601
  msgid "Total count of unread messages into the Thread for the requested user."
9602
  msgstr ""
9603
 
9604
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1204
9605
  msgid "The list of user IDs for all messages in the Thread."
9606
  msgstr ""
9607
 
9608
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1213
9609
  msgid "The list of recipient User Objects involved into the Thread."
9610
  msgstr ""
9611
 
9612
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1221
9613
  msgid "List of message objects for the thread."
9614
  msgstr ""
9615
 
9616
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1230
9617
  msgid "List of starred message IDs."
9618
  msgstr ""
9619
 
9620
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1268
9621
  msgid "Filter the result by box."
9622
  msgstr ""
9623
 
9624
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1277
9625
  msgid "Filter the result by thread status."
9626
  msgstr ""
9627
 
9628
- #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1286
9629
  msgid "Limit result to messages created by a specific user."
9630
  msgstr ""
9631
 
@@ -9800,92 +9810,92 @@ msgid "&rarr;"
9800
  msgstr ""
9801
 
9802
  #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:60
9803
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:757
9804
  msgid "A unique numeric ID for the notification."
9805
  msgstr ""
9806
 
9807
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:172
9808
  msgid "Sorry, you are not allowed to see the notifications."
9809
  msgstr ""
9810
 
9811
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:237
9812
  msgid "Sorry, you are not allowed to see the notification."
9813
  msgstr ""
9814
 
9815
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:249
9816
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:464
9817
  msgid "Invalid notification ID."
9818
  msgstr ""
9819
 
9820
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:259
9821
  msgid "Sorry, you cannot view this notification."
9822
  msgstr ""
9823
 
9824
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:294
9825
  msgid "Cannot create new notification."
9826
  msgstr ""
9827
 
9828
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:369
9829
  msgid "Notification is already with the status you are trying to update into."
9830
  msgstr ""
9831
 
9832
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:384
9833
  msgid "Cannot update the status of this notification."
9834
  msgstr ""
9835
 
9836
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:763
9837
  msgid "The ID of the user the notification is addressed to."
9838
  msgstr ""
9839
 
9840
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:769
9841
  msgid "The ID of the item associated with the notification."
9842
  msgstr ""
9843
 
9844
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:774
9845
  msgid "The ID of the secondary item associated with the notification."
9846
  msgstr ""
9847
 
9848
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:779
9849
  msgid "The name of the BuddyPress component the notification relates to."
9850
  msgstr ""
9851
 
9852
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:784
9853
  msgid "The name of the component's action the notification is about."
9854
  msgstr ""
9855
 
9856
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:788
9857
  msgid "The date the notification was created, in the site's timezone."
9858
  msgstr ""
9859
 
9860
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:795
9861
  msgid "Whether it's a new notification or not."
9862
  msgstr ""
9863
 
9864
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:825
9865
  msgid "Name of the field to order according to."
9866
  msgstr ""
9867
 
9868
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:843
9869
  msgid "Limit result set to notifications associated with a specific component"
9870
  msgstr ""
9871
 
9872
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:851
9873
  msgid "Limit result set to notifications associated with a specific component's action name."
9874
  msgstr ""
9875
 
9876
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:859
9877
  msgid "Limit result set to notifications addressed to a specific user."
9878
  msgstr ""
9879
 
9880
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:867
9881
  msgid "Limit result set to notifications associated with a specific item ID."
9882
  msgstr ""
9883
 
9884
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:875
9885
  msgid "Limit result set to notifications associated with a specific secondary item ID."
9886
  msgstr ""
9887
 
9888
- #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:883
9889
  msgid "Limit result set to items from specific states."
9890
  msgstr ""
9891
 
@@ -10480,7 +10490,7 @@ msgstr ""
10480
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:22
10481
  #: bp-templates/bp-legacy/buddypress/members/single/groups.php:22
10482
  #: bp-templates/bp-nouveau/includes/blogs/functions.php:106
10483
- #: bp-templates/bp-nouveau/includes/groups/functions.php:606
10484
  #: bp-templates/bp-nouveau/includes/members/functions.php:97
10485
  msgid "Last Active"
10486
  msgstr ""
@@ -10716,13 +10726,13 @@ msgstr ""
10716
 
10717
  #: bp-templates/bp-legacy/buddypress/groups/index.php:111
10718
  #: bp-templates/bp-legacy/buddypress/members/single/groups.php:23
10719
- #: bp-templates/bp-nouveau/includes/groups/functions.php:607
10720
  msgid "Most Members"
10721
  msgstr ""
10722
 
10723
  #: bp-templates/bp-legacy/buddypress/groups/index.php:112
10724
  #: bp-templates/bp-legacy/buddypress/members/single/groups.php:24
10725
- #: bp-templates/bp-nouveau/includes/groups/functions.php:608
10726
  msgid "Newly Created"
10727
  msgstr ""
10728
 
@@ -11064,7 +11074,7 @@ msgstr ""
11064
 
11065
  #. translators: accessibility text
11066
  #: bp-templates/bp-legacy/buddypress/members/single/groups/invites.php:21
11067
- #: bp-templates/bp-nouveau/includes/groups/functions.php:1230
11068
  msgid "Group invitations"
11069
  msgstr ""
11070
 
@@ -12110,7 +12120,7 @@ msgid "All Members"
12110
  msgstr ""
12111
 
12112
  #: bp-templates/bp-nouveau/includes/activity/functions.php:256
12113
- #: bp-templates/bp-nouveau/includes/groups/functions.php:538
12114
  msgid "My Groups"
12115
  msgstr ""
12116
 
@@ -12684,92 +12694,92 @@ msgstr ""
12684
  msgid "Group invites preferences saved."
12685
  msgstr ""
12686
 
12687
- #: bp-templates/bp-nouveau/includes/groups/functions.php:522
12688
  msgid "All Groups"
12689
  msgstr ""
12690
 
12691
- #: bp-templates/bp-nouveau/includes/groups/functions.php:707
12692
  msgid "Group front page"
12693
  msgstr ""
12694
 
12695
- #: bp-templates/bp-nouveau/includes/groups/functions.php:710
12696
  msgid "Configure the default front page for groups."
12697
  msgstr ""
12698
 
12699
- #: bp-templates/bp-nouveau/includes/groups/functions.php:713
12700
  msgid "Group navigation"
12701
  msgstr ""
12702
 
12703
- #: bp-templates/bp-nouveau/includes/groups/functions.php:716
12704
  msgid "Customize the navigation menu for groups. See your changes by navigating to a group in the live-preview window."
12705
  msgstr ""
12706
 
12707
- #: bp-templates/bp-nouveau/includes/groups/functions.php:817
12708
  msgid "Enable custom front pages for groups."
12709
  msgstr ""
12710
 
12711
- #: bp-templates/bp-nouveau/includes/groups/functions.php:823
12712
  msgid "Enable widget region for group homepages. When enabled, the site admin can add widgets to group pages via the Widgets panel."
12713
  msgstr ""
12714
 
12715
- #: bp-templates/bp-nouveau/includes/groups/functions.php:829
12716
  msgid "Display the group description in the body of the group's front page."
12717
  msgstr ""
12718
 
12719
- #: bp-templates/bp-nouveau/includes/groups/functions.php:835
12720
  msgid "Display the group navigation vertically."
12721
  msgstr ""
12722
 
12723
- #: bp-templates/bp-nouveau/includes/groups/functions.php:841
12724
  msgid "Use tab styling for primary navigation."
12725
  msgstr ""
12726
 
12727
- #: bp-templates/bp-nouveau/includes/groups/functions.php:847
12728
  msgid "Use tab styling for secondary navigation."
12729
  msgstr ""
12730
 
12731
- #: bp-templates/bp-nouveau/includes/groups/functions.php:853
12732
  msgid "Use tab styling for the group creation process."
12733
  msgstr ""
12734
 
12735
- #: bp-templates/bp-nouveau/includes/groups/functions.php:860
12736
  msgid "Reorder the primary navigation for a group."
12737
  msgstr ""
12738
 
12739
- #: bp-templates/bp-nouveau/includes/groups/functions.php:866
12740
  msgctxt "Customizer control label"
12741
  msgid "Groups"
12742
  msgstr ""
12743
 
12744
- #: bp-templates/bp-nouveau/includes/groups/functions.php:873
12745
  msgid "Group > Members"
12746
  msgstr ""
12747
 
12748
- #: bp-templates/bp-nouveau/includes/groups/functions.php:880
12749
  msgid "Use column navigation for the Groups directory."
12750
  msgstr ""
12751
 
12752
- #: bp-templates/bp-nouveau/includes/groups/functions.php:886
12753
  msgid "Use tab styling for Groups directory navigation."
12754
  msgstr ""
12755
 
12756
- #: bp-templates/bp-nouveau/includes/groups/functions.php:1205
12757
  msgid "Pending Group membership requests"
12758
  msgstr ""
12759
 
12760
- #: bp-templates/bp-nouveau/includes/groups/functions.php:1210
12761
  msgid "Accepted Group membership requests"
12762
  msgstr ""
12763
 
12764
- #: bp-templates/bp-nouveau/includes/groups/functions.php:1215
12765
  msgid "Rejected Group membership requests"
12766
  msgstr ""
12767
 
12768
- #: bp-templates/bp-nouveau/includes/groups/functions.php:1220
12769
  msgid "Group Administrator promotions"
12770
  msgstr ""
12771
 
12772
- #: bp-templates/bp-nouveau/includes/groups/functions.php:1225
12773
  msgid "Group Moderator promotions"
12774
  msgstr ""
12775
 
@@ -13191,28 +13201,28 @@ msgstr ""
13191
  msgid "The value(s) for the field data."
13192
  msgstr ""
13193
 
13194
- #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:143
13195
- #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:202
13196
- #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:337
13197
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:213
13198
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:639
13199
- msgid "Invalid field ID."
13200
  msgstr ""
13201
 
13202
- #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:167
13203
- msgid "Sorry, the profile field value is not viewable for this user."
 
 
 
 
13204
  msgstr ""
13205
 
13206
- #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:225
13207
  msgid "Cannot save XProfile data."
13208
  msgstr ""
13209
 
13210
- #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:280
13211
- msgid "Sorry, you need to be logged in to save XProfile data."
13212
  msgstr ""
13213
 
13214
- #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:302
13215
- msgid "Sorry, you cannot save XProfile field data."
13216
  msgstr ""
13217
 
13218
  #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:356
@@ -13232,17 +13242,17 @@ msgid "The value of the field data."
13232
  msgstr ""
13233
 
13234
  #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:562
13235
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1083
13236
  msgid "Value for the field, as it exists in the database."
13237
  msgstr ""
13238
 
13239
  #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:567
13240
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1088
13241
  msgid "Unserialized value for the field, regular string will be casted as array."
13242
  msgstr ""
13243
 
13244
  #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:576
13245
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1094
13246
  msgid "HTML value for the field, transformed for display."
13247
  msgstr ""
13248
 
@@ -13251,116 +13261,116 @@ msgid "The date the field data was last updated, in the site's timezone."
13251
  msgstr ""
13252
 
13253
  #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:73
13254
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:726
13255
  msgid "A unique numeric ID for the group of profile fields."
13256
  msgstr ""
13257
 
13258
  #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:240
13259
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:421
13260
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:523
13261
  msgid "Invalid field group ID."
13262
  msgstr ""
13263
 
13264
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:322
13265
  msgid "Required param missing."
13266
  msgstr ""
13267
 
13268
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:334
13269
  msgid "Cannot create new XProfile field group."
13270
  msgstr ""
13271
 
13272
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:386
13273
  msgid "Sorry, you are not allowed to view this XProfile field group."
13274
  msgstr ""
13275
 
13276
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:440
13277
  msgid "Cannot update XProfile field group."
13278
  msgstr ""
13279
 
13280
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:533
13281
  msgid "Could not delete XProfile field group."
13282
  msgstr ""
13283
 
13284
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:732
13285
  msgid "The name of group of profile fields."
13286
  msgstr ""
13287
 
13288
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:740
13289
  msgid "The description of the group of profile fields."
13290
  msgstr ""
13291
 
13292
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:748
13293
  msgid "Content for the group of profile fields, as it exists in the database."
13294
  msgstr ""
13295
 
13296
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:753
13297
  msgid "HTML content for the group of profile fields, transformed for display."
13298
  msgstr ""
13299
 
13300
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:762
13301
  msgid "The order of the group of profile fields."
13302
  msgstr ""
13303
 
13304
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:767
13305
  msgid "Whether the group of profile fields can be deleted or not."
13306
  msgstr ""
13307
 
13308
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:772
13309
  msgid "The fields associated with this group of profile fields."
13310
  msgstr ""
13311
 
13312
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:799
13313
  msgid "ID of the field group that have fields."
13314
  msgstr ""
13315
 
13316
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:807
13317
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:832
13318
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1132
13319
  msgid "Whether to hide profile groups of fields that do not have any profile fields or not."
13320
  msgstr ""
13321
 
13322
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:815
13323
  #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:73
13324
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1140
13325
  msgid "Required if you want to load a specific user's data."
13326
  msgstr ""
13327
 
13328
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:823
13329
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1148
13330
  msgid "Limit fields by those restricted to a given member type, or array of member types. If `$user_id` is provided, the value of `$member_type` will be overridden by the member types of the provided user. The special value of 'any' will return only those fields that are unrestricted by member type - i.e., those applicable to any type."
13331
  msgstr ""
13332
 
13333
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:840
13334
  msgid "Whether to fetch the fields for each group."
13335
  msgstr ""
13336
 
13337
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:848
13338
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1165
13339
  msgid "Whether to fetch data for each field. Requires a $user_id."
13340
  msgstr ""
13341
 
13342
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:856
13343
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1173
13344
  msgid "Whether to fetch the visibility level for each field."
13345
  msgstr ""
13346
 
13347
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:864
13348
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1181
13349
  msgid "Ensure result set excludes specific profile field groups."
13350
  msgstr ""
13351
 
13352
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:873
13353
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1190
13354
  msgid "Ensure result set excludes specific profile fields."
13355
  msgstr ""
13356
 
13357
- #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:882
13358
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1199
13359
  msgid "Whether to pre-fetch xprofilemeta for all retrieved groups, fields, and data."
13360
  msgstr ""
13361
 
13362
  #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:63
13363
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:977
13364
  msgid "A unique numeric ID for the profile field."
13365
  msgstr ""
13366
 
@@ -13380,7 +13390,7 @@ msgstr ""
13380
  msgid "Cannot create new XProfile field."
13381
  msgstr ""
13382
 
13383
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:425
13384
  msgid "Sorry, you are not allowed to create a XProfile field."
13385
  msgstr ""
13386
 
@@ -13396,92 +13406,91 @@ msgstr ""
13396
  msgid "Could not delete XProfile field."
13397
  msgstr ""
13398
 
13399
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:627
13400
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:649
13401
  msgid "Sorry, you are not allowed to delete this field."
13402
  msgstr ""
13403
 
13404
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:910
13405
  msgid "Default visibility for the profile field."
13406
  msgstr ""
13407
 
13408
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:918
13409
  msgid "Whether to allow members to set the visibility for the profile field data or not."
13410
  msgstr ""
13411
 
13412
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:926
13413
  msgid "Autolink status for this profile field"
13414
  msgstr ""
13415
 
13416
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:983
13417
  msgid "The ID of the group the field is part of."
13418
  msgstr ""
13419
 
13420
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:988
13421
  msgid "The ID of the parent field."
13422
  msgstr ""
13423
 
13424
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:993
13425
  msgid "The type for the profile field."
13426
  msgstr ""
13427
 
13428
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1002
13429
  msgid "The name of the profile field."
13430
  msgstr ""
13431
 
13432
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1010
13433
  msgid "The description of the profile field."
13434
  msgstr ""
13435
 
13436
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1018
13437
  msgid "Content for the profile field, as it exists in the database."
13438
  msgstr ""
13439
 
13440
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1023
13441
  msgid "HTML content for the profile field, transformed for display."
13442
  msgstr ""
13443
 
13444
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1032
13445
  msgid "Whether the profile field must have a value."
13446
  msgstr ""
13447
 
13448
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1037
13449
  msgid "Whether the profile field can be deleted or not."
13450
  msgstr ""
13451
 
13452
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1043
13453
  msgid "The order of the profile field into the group of fields."
13454
  msgstr ""
13455
 
13456
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1048
13457
  msgid "The order of the option into the profile field list of options"
13458
  msgstr ""
13459
 
13460
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1053
13461
  msgid "The way profile field's options are ordered."
13462
  msgstr ""
13463
 
13464
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1060
13465
  msgid "Whether the option is the default one for the profile field."
13466
  msgstr ""
13467
 
13468
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1065
13469
  msgid "Who may see the saved value for this profile field."
13470
  msgstr ""
13471
 
13472
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1072
13473
  msgid "Options of the profile field."
13474
  msgstr ""
13475
 
13476
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1078
13477
  msgid "The saved value for this profile field."
13478
  msgstr ""
13479
 
13480
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1124
13481
  msgid "ID of the profile group of fields that have profile fields"
13482
  msgstr ""
13483
 
13484
- #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1157
13485
  msgid "Whether to hide profile fields where the user has not provided data or not."
13486
  msgstr ""
13487
 
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-03-16T19:37:37+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: buddypress\n"
735
  #: bp-activity/bp-activity-notifications.php:402
736
  #: bp-blogs/bp-blogs-template.php:1183
737
  #: bp-core/admin/bp-core-admin-tools.php:671
738
+ #: bp-core/classes/class-bp-admin-types.php:435
739
  #: bp-friends/bp-friends-functions.php:962
740
  #: bp-friends/bp-friends-notifications.php:256
741
  #: bp-groups/bp-groups-notifications.php:1143
1192
 
1193
  #: bp-activity/classes/class-bp-rest-activity-endpoint.php:71
1194
  #: bp-activity/classes/class-bp-rest-activity-endpoint.php:109
1195
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1272
1196
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:927
1197
  msgid "A unique numeric ID for the activity."
1198
  msgstr ""
1199
 
1200
  #: bp-activity/classes/class-bp-rest-activity-endpoint.php:293
1201
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:597
1202
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:700
1203
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:755
1204
  msgid "Invalid activity ID."
1205
  msgstr ""
1206
 
1207
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:333
1208
  msgid "Sorry, you cannot view the activities."
1209
  msgstr ""
1210
 
1211
  #: bp-activity/classes/class-bp-rest-activity-endpoint.php:368
1212
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:526
1213
  msgid "Please, enter some content."
1214
  msgstr ""
1215
 
1217
  msgid "Cannot create new activity."
1218
  msgstr ""
1219
 
1220
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:475
 
1221
  msgid "Sorry, you are not allowed to create activities."
1222
  msgstr ""
1223
 
1224
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:538
1225
  msgid "Cannot update existing activity."
1226
  msgstr ""
1227
 
1228
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:585
 
1229
  msgid "Sorry, you are not allowed to update this activity."
1230
  msgstr ""
1231
 
1232
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:647
1233
  msgid "Could not delete the activity."
1234
  msgstr ""
1235
 
1236
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:688
 
1237
  msgid "Sorry, you are not allowed to delete this activity."
1238
  msgstr ""
1239
 
1240
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:767
1241
  msgid "Sorry, you cannot remove the activity from your favorites."
1242
  msgstr ""
1243
 
1244
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:773
1245
  msgid "Sorry, you cannot add the activity to your favorites."
1246
  msgstr ""
1247
 
1248
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:824
1249
  msgid "Sorry, you are not allowed to update favorites."
1250
  msgstr ""
1251
 
1252
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1278
1253
  msgid "The ID of some other object primarily associated with this one."
1254
  msgstr ""
1255
 
1256
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1283
1257
  msgid "The ID of some other object also associated with this one."
1258
  msgstr ""
1259
 
1260
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1288
1261
  msgid "The ID for the author of the activity."
1262
  msgstr ""
1263
 
1264
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1294
1265
  msgid "The permalink to this activity on the site."
1266
  msgstr ""
1267
 
1268
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1300
1269
  msgid "The active BuddyPress component the activity relates to."
1270
  msgstr ""
1271
 
1272
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1309
1273
  msgid "The activity type of the activity."
1274
  msgstr ""
1275
 
1276
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1318
1277
  msgid "The description of the activity's type (eg: Username posted an update)"
1278
  msgstr ""
1279
 
1280
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1327
1281
  msgid "Allowed HTML content for the activity."
1282
  msgstr ""
1283
 
1284
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1335
1285
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:932
1286
  msgid "Content for the activity, as it exists in the database."
1287
  msgstr ""
1288
 
1289
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1340
1290
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:937
1291
  msgid "HTML content for the activity, transformed for display."
1292
  msgstr ""
1293
 
1294
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1349
1295
  msgid "The date the activity was published, in the site's timezone."
1296
  msgstr ""
1297
 
1298
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1355
1299
  msgid "Whether the activity has been marked as spam or not."
1300
  msgstr ""
1301
 
1302
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1365
1303
  msgid "A list of objects children of the activity object."
1304
  msgstr ""
1305
 
1306
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1371
1307
  msgid "Total number of comments of the activity object."
1308
  msgstr ""
1309
 
1310
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1377
1311
  msgid "Whether the activity object should be sitewide hidden or not."
1312
  msgstr ""
1313
 
1314
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1382
1315
  msgid "Whether the activity object has been favorited by the current user."
1316
  msgstr ""
1317
 
1318
  #. translators: 1: Full avatar width in pixels. 2: Full avatar height in pixels
1319
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1396
1320
  #: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:689
1321
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1271
1322
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:960
1323
  msgid "Avatar URL with full image size (%1$d x %2$d pixels)."
1324
  msgstr ""
1325
 
1326
  #. translators: 1: Thumb avatar width in pixels. 2: Thumb avatar height in pixels
1327
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1404
1328
  #: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:697
1329
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1279
1330
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:968
1331
  msgid "Avatar URL with thumb image size (%1$d x %2$d pixels)."
1332
  msgstr ""
1333
 
1334
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1411
1335
  msgid "Avatar URLs for the author of the activity."
1336
  msgstr ""
1337
 
1338
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1438
1339
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:1045
1340
  msgid "Ensure result set excludes specific IDs."
1341
  msgstr ""
1342
 
1343
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1447
1344
  #: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:742
1345
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:1036
1346
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:1012
1347
  msgid "Ensure result set includes specific IDs."
1348
  msgstr ""
1349
 
1350
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1456
1351
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1323
1352
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:1030
1353
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:830
1354
  msgid "Order sort attribute ascending or descending."
1355
  msgstr ""
1356
 
1357
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1465
1358
  msgid "Limit result set to items published after a given ISO8601 compliant date."
1359
  msgstr ""
1360
 
1361
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1472
1362
  msgid "Limit result set to items created by a specific user (ID)."
1363
  msgstr ""
1364
 
1365
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1480
1366
  #: bp-core/classes/class-bp-rest-components-endpoint.php:480
1367
  msgid "Limit result set to items with a specific status."
1368
  msgstr ""
1369
 
1370
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1489
1371
  msgid "Limit result set to items with a specific scope."
1372
  msgstr ""
1373
 
1374
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1497
1375
  msgid "Limit result set to items created by a specific group."
1376
  msgstr ""
1377
 
1378
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1505
1379
  msgid "Limit result set to items created by a specific site."
1380
  msgstr ""
1381
 
1382
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1513
1383
  msgid "Limit result set to items with a specific prime association ID."
1384
  msgstr ""
1385
 
1386
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1521
1387
  msgid "Limit result set to items with a specific secondary association ID."
1388
  msgstr ""
1389
 
1390
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1529
1391
  msgid "Limit result set to items with a specific active BuddyPress component."
1392
  msgstr ""
1393
 
1394
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1537
1395
  msgid "Limit result set to items with a specific activity type."
1396
  msgstr ""
1397
 
1398
+ #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1548
1399
  msgid "No comments by default, stream for within stream display, threaded for below each activity item."
1400
  msgstr ""
1401
 
1698
  msgid "Sorry, there was a problem fetching the blog avatar."
1699
  msgstr ""
1700
 
1701
+ #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:169
1702
+ #: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:365
1703
+ #: bp-core/classes/class-bp-rest-components-endpoint.php:164
1704
+ #: bp-groups/classes/class-bp-rest-attachments-group-cover-endpoint.php:334
1705
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:344
1706
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:476
1707
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:600
1708
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:321
1709
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:475
1710
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:624
1711
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:184
1712
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:287
1713
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:416
1714
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:535
1715
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:663
1716
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:254
1717
+ #: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:333
1718
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:235
1719
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:310
1720
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:185
1721
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:375
1722
+ msgid "Sorry, you are not allowed to perform this action."
1723
+ msgstr ""
1724
+
1725
+ #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:180
1726
+ #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:174
1727
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:229
1728
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:508
1729
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:206
1730
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:353
1731
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:508
1732
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:657
1733
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:210
1734
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:446
1735
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:280
1736
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:476
1737
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:574
1738
  msgid "Invalid group ID."
1739
  msgstr ""
1740
 
1741
+ #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:190
1742
  msgid "Sorry, blog avatar is disabled."
1743
  msgstr ""
1744
 
1745
+ #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:255
1746
+ #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:438
1747
+ #: bp-groups/classes/class-bp-rest-attachments-group-cover-endpoint.php:421
1748
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:449
1749
+ #: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:421
1750
  msgid "Full size of the image file."
1751
  msgstr ""
1752
 
1753
+ #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:262
1754
+ #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:444
1755
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:456
1756
  msgid "Thumb size of the image file."
1757
  msgstr ""
1758
 
1759
+ #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:293
1760
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:487
1761
  msgid "Whether to return an <img> HTML element, vs a raw URL to an avatar."
1762
  msgstr ""
1763
 
1764
+ #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:301
1765
+ #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:482
1766
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:495
1767
  msgid "The alt attribute for the <img> element."
1768
  msgstr ""
1769
 
1770
+ #: bp-blogs/classes/class-bp-rest-attachments-blog-avatar-endpoint.php:309
1771
  msgid "Whether to disable the default Gravatar Admin user fallback."
1772
  msgstr ""
1773
 
1788
  msgid "There was a problem creating blog."
1789
  msgstr ""
1790
 
1791
+ #: bp-blogs/classes/class-bp-rest-blogs-endpoint.php:377
 
 
 
 
 
 
1792
  msgid "Sorry, blog creation is disabled."
1793
  msgstr ""
1794
 
3797
 
3798
  #: bp-core/bp-core-template.php:3145
3799
  #: bp-groups/bp-groups-template.php:3557
3800
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:585
3801
  msgid "Create a Group"
3802
  msgstr ""
3803
 
3827
  msgid "Members"
3828
  msgstr ""
3829
 
3830
+ #: bp-core/classes/class-bp-admin-types.php:324
3831
+ #: bp-core/classes/class-bp-admin-types.php:498
3832
  msgid "Type ID"
3833
  msgstr ""
3834
 
3835
+ #: bp-core/classes/class-bp-admin-types.php:325
3836
  msgid "Enter a lower-case string without spaces or special characters (used internally to identify the type)."
3837
  msgstr ""
3838
 
3839
+ #: bp-core/classes/class-bp-admin-types.php:367
3840
  msgid "Type metadata labels need to be set into the labels argument when registering your taxonomy using the meta key as the label’s key."
3841
  msgstr ""
3842
 
3843
  #. translators: %s is the name of the Type meta key
3844
+ #: bp-core/classes/class-bp-admin-types.php:371
3845
  msgid "As a result, the form elements for the \"%s\" meta key cannot be displayed"
3846
  msgstr ""
3847
 
3848
+ #: bp-core/classes/class-bp-admin-types.php:503
3849
  #: bp-core/deprecated/1.5.php:153
3850
  #: bp-members/classes/class-bp-members-list-table.php:151
3851
  #: bp-members/classes/class-bp-members-ms-list-table.php:138
3854
  msgid "Name"
3855
  msgstr ""
3856
 
3857
+ #: bp-core/classes/class-bp-admin-types.php:504
3858
  msgctxt "Number/count of types"
3859
  msgid "Count"
3860
  msgstr ""
5242
  #: bp-friends/classes/class-bp-rest-friends-endpoint.php:132
5243
  #: bp-friends/classes/class-bp-rest-friends-endpoint.php:213
5244
  #: bp-friends/classes/class-bp-rest-friends-endpoint.php:305
5245
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:433
5246
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:528
5247
  msgid "There was a problem confirming if user is valid."
5248
  msgstr ""
5249
 
5250
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:177
5251
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:268
5252
+ #: bp-groups/classes/class-bp-rest-attachments-group-cover-endpoint.php:351
5253
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:271
5254
+ #: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:350
5255
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:202
 
5256
  msgid "Sorry, you need to be logged in to perform this action."
5257
  msgstr ""
5258
 
5259
  #: bp-friends/classes/class-bp-rest-friends-endpoint.php:228
5260
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:367
5261
  msgid "Friendship does not exist."
5262
  msgstr ""
5263
 
5265
  msgid "Those users are already friends or have sent friendship request(s) recently."
5266
  msgstr ""
5267
 
5268
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:338
5269
  #: bp-templates/bp-nouveau/includes/groups/functions.php:495
5270
  msgid "You are not allowed to perform this action."
5271
  msgstr ""
5272
 
5273
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:352
5274
  msgid "There was an error trying to create the friendship."
5275
  msgstr ""
5276
 
5277
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:448
5278
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:543
5279
  msgid "Invalid friendship ID."
5280
  msgstr ""
5281
 
5282
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:459
5283
  msgid "Could not accept friendship."
5284
  msgstr ""
5285
 
5286
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:577
5287
  msgid "Could not delete friendship."
5288
  msgstr ""
5289
 
5290
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:732
5291
  msgid "A unique numeric ID of a user."
5292
  msgstr ""
5293
 
5294
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:751
5295
  msgid "Whether to force the friendship agreement."
5296
  msgstr ""
5297
 
5298
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:763
5299
  msgid "Whether to force friendship removal."
5300
  msgstr ""
5301
 
5302
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:823
5303
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:893
5304
  msgid "Unique numeric identifier of the friendship."
5305
  msgstr ""
5306
 
5307
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:828
5308
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:901
5309
  msgid "The ID of the user who is requesting the Friendship."
5310
  msgstr ""
5311
 
5312
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:833
5313
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:909
5314
  msgid "The ID of the user who is invited to agree to the Friendship request."
5315
  msgstr ""
5316
 
5317
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:838
5318
  msgid "Whether the friendship been confirmed/accepted."
5319
  msgstr ""
5320
 
5321
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:844
5322
  msgid "The date the friendship was created, in the site's timezone."
5323
  msgstr ""
5324
 
5325
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:876
5326
  msgid "ID of the member whose friendships are being retrieved."
5327
  msgstr ""
5328
 
5329
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:885
5330
  msgid "Wether the friendship has been accepted."
5331
  msgstr ""
5332
 
5333
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:917
5334
  msgid "Column name to order the results by."
5335
  msgstr ""
5336
 
5337
+ #: bp-friends/classes/class-bp-rest-friends-endpoint.php:926
5338
  msgid "Order results ascending or descending."
5339
  msgstr ""
5340
 
5371
  msgstr ""
5372
 
5373
  #: bp-groups/actions/create.php:27
5374
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:381
5375
  msgid "Sorry, you are not allowed to create groups."
5376
  msgstr ""
5377
 
6589
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:24
6590
  #: bp-templates/bp-legacy/buddypress/members/single/groups.php:25
6591
  #: bp-templates/bp-nouveau/includes/blogs/functions.php:108
6592
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:643
6593
  #: bp-templates/bp-nouveau/includes/members/functions.php:102
6594
  #: bp-templates/bp-nouveau/includes/members/functions.php:120
6595
  msgid "Alphabetical"
6970
  #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:63
6971
  #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:89
6972
  #: bp-groups/classes/class-bp-rest-groups-endpoint.php:60
6973
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1131
6974
  msgid "A unique numeric ID for the Group."
6975
  msgstr ""
6976
 
6985
  msgid "Sorry, you need an image file to upload."
6986
  msgstr ""
6987
 
6988
+ #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:263
6989
  msgid "Sorry, group avatar upload is disabled."
6990
  msgstr ""
6991
 
6992
+ #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:273
6993
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:187
 
 
 
 
6994
  msgid "Sorry, you are not authorized to perform this action."
6995
  msgstr ""
6996
 
6997
+ #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:307
6998
  msgid "Sorry, there are no uploaded avatars for this group on this site."
6999
  msgstr ""
7000
 
7001
+ #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:340
7002
  msgid "Sorry, there was a problem deleting this group avatar."
7003
  msgstr ""
7004
 
7005
+ #: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php:474
7006
  msgid "Whether to return an <img> HTML element, vs a raw URL to a group avatar."
7007
  msgstr ""
7008
 
7010
  msgid "Sorry, there was a problem fetching this group cover."
7011
  msgstr ""
7012
 
7013
+ #: bp-groups/classes/class-bp-rest-attachments-group-cover-endpoint.php:160
7014
  msgid "Invalid group id."
7015
  msgstr ""
7016
 
7026
  msgid "A unique numeric ID for the group invitation."
7027
  msgstr ""
7028
 
7029
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:187
7030
+ msgid "Sorry, you are not allowed to fetch group invitations with those arguments."
7031
+ msgstr ""
7032
+
7033
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:201
7034
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:353
7035
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:610
7036
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:734
7037
  msgid "Sorry, you need to be logged in to see the group invitations."
7038
  msgstr ""
7039
 
7040
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:217
7041
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:252
7042
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:274
7043
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:497
7044
  #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:218
7045
  #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:438
7046
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:165
7047
+ #: bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php:155
7048
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:245
7049
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:323
7050
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:197
7051
+ #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:160
7052
+ #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:290
7053
  msgid "Invalid member ID."
7054
  msgstr ""
7055
 
7056
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:364
7057
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:621
7058
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:744
 
 
 
 
7059
  msgid "Invalid group invitation ID."
7060
  msgstr ""
7061
 
7062
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:381
7063
  msgid "Sorry, you are not allowed to fetch an invitation."
7064
  msgstr ""
7065
 
7066
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:427
7067
  msgid "Could not invite member to the group."
7068
  msgstr ""
7069
 
7070
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:485
7071
  msgid "Sorry, you need to be logged in to create an invitation."
7072
  msgstr ""
7073
 
7074
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:519
7075
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:533
7076
  msgid "Sorry, you are not allowed to create the invitation as requested."
7077
  msgstr ""
7078
 
7079
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:556
7080
  msgid "Could not accept group invitation."
7081
  msgstr ""
7082
 
7083
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:631
7084
  msgid "Sorry, you are not allowed to accept the invitation as requested."
7085
  msgstr ""
7086
 
7087
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:684
7088
  msgid "Could not delete group invitation."
7089
  msgstr ""
7090
 
7091
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:759
7092
  msgid "Sorry, you are not allowed to delete the invitation as requested."
7093
  msgstr ""
7094
 
7095
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:905
7096
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:823
7097
  msgid "The optional message to send to the invited user."
7098
  msgstr ""
7099
 
7100
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:914
7101
  msgid "Whether the invite should be sent to the invitee."
7102
  msgstr ""
7103
 
7104
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:950
7105
  msgid "A unique numeric ID for the BP Invitation object."
7106
  msgstr ""
7107
 
7108
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:956
7109
  msgid "The ID of the user who is invited to join the Group."
7110
  msgstr ""
7111
 
7112
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:961
7113
  msgid "Whether the invite has been sent to the invitee."
7114
  msgstr ""
7115
 
7116
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:966
7117
  msgid "The ID of the user who made the invite."
7118
  msgstr ""
7119
 
7120
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:971
7121
  msgid "The ID of the group to which the user has been invited."
7122
  msgstr ""
7123
 
7124
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:976
7125
  msgid "The date the object was created or last updated, in the site's timezone."
7126
  msgstr ""
7127
 
7128
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:982
7129
  msgid "Invitation or request."
7130
  msgstr ""
7131
 
7132
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:989
7133
  msgid "The raw and rendered versions for the content of the message."
7134
  msgstr ""
7135
 
7136
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:997
7137
  msgid "Content for the object, as it exists in the database."
7138
  msgstr ""
7139
 
7140
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:1002
7141
  msgid "HTML content for the object, transformed for display."
7142
  msgstr ""
7143
 
7144
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:1036
7145
  msgid "ID of the group to limit results to."
7146
  msgstr ""
7147
 
7148
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:1045
7149
  msgid "Return only invitations extended to this user."
7150
  msgstr ""
7151
 
7152
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:1054
7153
  msgid "Return only invitations extended by this user."
7154
  msgstr ""
7155
 
7156
+ #: bp-groups/classes/class-bp-rest-group-invites-endpoint.php:1063
7157
  msgid "Limit result set to invites that have been sent, not sent, or include all."
7158
  msgstr ""
7159
 
7161
  msgid "A unique numeric ID for the Group Member."
7162
  msgstr ""
7163
 
7164
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:196
7165
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:270
7166
+ msgid "Sorry, you cannot view the group."
7167
+ msgstr ""
7168
+
7169
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:242
7170
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:363
7171
  msgid "Could not join the group."
7172
  msgstr ""
7173
 
7174
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:267
7175
  msgid "Could not add member to the group."
7176
  msgstr ""
7177
 
7178
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:330
7179
  msgid "Sorry, you need to be logged in to join a group."
7180
  msgstr ""
7181
 
7182
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:342
7183
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:497
7184
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:646
7185
  msgid "Invalid group member ID."
7186
  msgstr ""
7187
 
7188
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:403
7189
  msgid "Could not promote member."
7190
  msgstr ""
7191
 
7192
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:413
7193
  msgid "Could not demote member."
7194
  msgstr ""
7195
 
7196
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:422
7197
  msgid "Could not demote member from the group."
7198
  msgstr ""
7199
 
7200
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:423
7201
  msgid "Could not ban member from the group."
7202
  msgstr ""
7203
 
7204
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:424
7205
  msgid "Could not unban member from the group."
7206
  msgstr ""
7207
 
7208
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:485
7209
  #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:546
7210
  msgid "Sorry, you need to be logged in to make an update."
7211
  msgstr ""
7212
 
7213
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:530
7214
  msgid "Sorry, you are not allowed to ban this group member."
7215
  msgstr ""
7216
 
7217
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:531
7218
  msgid "Sorry, you are not allowed to unban this group member."
7219
  msgstr ""
7220
 
7221
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:532
7222
  msgid "Sorry, you are not allowed to promote this group member."
7223
  msgstr ""
7224
 
7225
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:533
7226
  msgid "Sorry, you are not allowed to demote this group member."
7227
  msgstr ""
7228
 
7229
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:578
7230
  msgid "Could not remove member from this group."
7231
  msgstr ""
7232
 
7233
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:634
 
 
7234
  msgid "Sorry, you need to be logged in to view a group membership."
7235
  msgstr ""
7236
 
7237
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:791
7238
  msgid "Group role to assign the user to."
7239
  msgstr ""
7240
 
7241
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:805
7242
  msgid "A unique numeric ID for the Member to add to the Group."
7243
  msgstr ""
7244
 
7245
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:816
7246
  msgid "Action used to update a group member."
7247
  msgstr ""
7248
 
7249
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:856
7250
  msgid "Whether the member is a group moderator."
7251
  msgstr ""
7252
 
7253
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:862
7254
  msgid "Whether the member has been banned from the group."
7255
  msgstr ""
7256
 
7257
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:868
7258
  msgid "Whether the member is a group administrator."
7259
  msgstr ""
7260
 
7261
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:874
7262
  msgid "Whether the membership of this user has been confirmed."
7263
  msgstr ""
7264
 
7265
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:880
7266
  msgid "The date of the last time the membership of this user was modified, in the site's timezone."
7267
  msgstr ""
7268
 
7269
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:910
7270
  msgid "Sort the order of results by the status of the group members."
7271
  msgstr ""
7272
 
7273
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:919
7274
  msgid "Ensure result set includes specific group roles."
7275
  msgstr ""
7276
 
7277
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:931
7278
  msgid "Ensure result set excludes specific member IDs."
7279
  msgstr ""
7280
 
7281
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:940
7282
  msgid "Whether results should exclude group admins and mods."
7283
  msgstr ""
7284
 
7285
+ #: bp-groups/classes/class-bp-rest-group-membership-endpoint.php:948
7286
  msgid "Whether results should exclude banned group members."
7287
  msgstr ""
7288
 
7290
  msgid "A unique numeric ID for the group membership request."
7291
  msgstr ""
7292
 
7293
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:202
7294
  msgid "Sorry, you need to be logged in to view membership requests."
7295
  msgstr ""
7296
 
7297
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:228
7298
  msgid "Sorry, you are not allowed to view membership requests."
7299
  msgstr ""
7300
 
7301
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:298
7302
  msgid "Sorry, you need to be logged in to get a membership."
7303
  msgstr ""
7304
 
7305
  #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:306
7306
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:554
7307
  #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:682
7308
  msgid "Invalid group membership request ID."
7309
  msgstr ""
7310
 
7311
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:316
7312
  msgid "Sorry, you are not allowed to view a membership request."
7313
  msgstr ""
7314
 
7315
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:351
7316
  msgid "There is already a request to this member."
7317
  msgstr ""
7318
 
7319
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:369
7320
  msgid "Could not send membership request to this group."
7321
  msgstr ""
7322
 
7323
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:430
7324
  msgid "Sorry, you need to be logged in to create a membership request."
7325
  msgstr ""
7326
 
7327
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:456
7328
  msgid "User may not extend requests on behalf of another user."
7329
  msgstr ""
7330
 
7331
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:488
7332
  msgid "There was an error accepting the membership request."
7333
  msgstr ""
7334
 
7335
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:564
7336
  msgid "User is not allowed to approve membership requests to this group."
7337
  msgstr ""
7338
 
7339
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:618
7340
  msgid "There was an error rejecting the membership request."
7341
  msgstr ""
7342
 
7343
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:674
7344
  msgid "Sorry, you need to be logged in to delete a request."
7345
  msgstr ""
7346
 
7347
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:692
7348
  msgid "User is not allowed to delete this membership request."
7349
  msgstr ""
7350
 
7351
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:863
7352
  msgid "The ID of the user who requested a Group membership."
7353
  msgstr ""
7354
 
7355
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:864
7356
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:891
7357
  msgid "The ID of the group the user requested a membership for."
7358
  msgstr ""
7359
 
7360
+ #: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php:890
7361
  msgid "Return only Membership requests made by a specific user."
7362
  msgstr ""
7363
 
7369
  msgid "The maximum amount of groups the user is member of to return. Defaults to all groups."
7370
  msgstr ""
7371
 
7372
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:317
 
 
 
 
7373
  msgid "Please, enter the name of group."
7374
  msgstr ""
7375
 
7376
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:329
7377
  msgid "Cannot create new group."
7378
  msgstr ""
7379
 
7380
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:419
7381
  msgid "Cannot update existing group."
7382
  msgstr ""
7383
 
7384
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:466
7385
+ msgid "Sorry, you are not allowed to update this group."
7386
  msgstr ""
7387
 
7388
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:484
7389
+ msgid "Sorry, you need to be logged in to update this group."
7390
  msgstr ""
7391
 
7392
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:523
7393
  msgid "Could not delete the group."
7394
  msgstr ""
7395
 
7396
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:564
7397
+ msgid "Sorry, you are not allowed to delete this group."
7398
  msgstr ""
7399
 
7400
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:582
7401
+ msgid "Sorry, you need to be logged in to delete this group."
7402
  msgstr ""
7403
 
7404
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:617
7405
  msgid "Invalid user ID."
7406
  msgstr ""
7407
 
7408
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:687
7409
  msgid "Sorry, you need to be logged in to view your groups."
7410
  msgstr ""
7411
 
7412
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1072
7413
  msgid "Assign one or more type to a group. To assign more than one type, use a comma separated list of types."
7414
  msgstr ""
7415
 
7416
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1085
7417
  msgid "Append one or more type to a group. To append more than one type, use a comma separated list of types."
7418
  msgstr ""
7419
 
7420
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1094
7421
  msgid "Remove one or more type of a group. To remove more than one type, use a comma separated list of types."
7422
  msgstr ""
7423
 
7424
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1137
7425
  msgid "The ID of the user who created the Group."
7426
  msgstr ""
7427
 
7428
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1143
7429
  msgid "The name of the Group."
7430
  msgstr ""
7431
 
7432
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1152
7433
  msgid "The URL-friendly slug for the Group."
7434
  msgstr ""
7435
 
7436
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1160
7437
  msgid "The permalink to the Group on the site."
7438
  msgstr ""
7439
 
7440
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1167
7441
  msgid "The description of the Group."
7442
  msgstr ""
7443
 
7444
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1176
7445
  msgid "Content for the description of the Group, as it exists in the database."
7446
  msgstr ""
7447
 
7448
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1181
7449
  msgid "HTML content for the description of the Group, transformed for display."
7450
  msgstr ""
7451
 
7452
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1190
7453
  msgid "The status of the Group."
7454
  msgstr ""
7455
 
7456
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1200
7457
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1406
7458
  msgid "Whether the Group has a forum enabled or not."
7459
  msgstr ""
7460
 
7461
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1205
7462
  msgid "ID of the parent Group."
7463
  msgstr ""
7464
 
7465
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1210
7466
  msgid "The date the Group was created, in the site's timezone."
7467
  msgstr ""
7468
 
7469
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1217
7470
  msgid "The type(s) of the Group."
7471
  msgstr ""
7472
 
7473
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1227
7474
  msgid "Group administrators."
7475
  msgstr ""
7476
 
7477
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1236
7478
  msgid "Group moderators."
7479
  msgstr ""
7480
 
7481
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1245
7482
  msgid "Count of all Group members."
7483
  msgstr ""
7484
 
7485
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1251
7486
  msgid "The date the Group was last active, in the site's timezone."
7487
  msgstr ""
7488
 
7489
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1258
7490
  msgid "The human diff time the Group was last active, in the site's timezone."
7491
  msgstr ""
7492
 
7493
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1286
7494
  msgid "Avatar URLs for the group."
7495
  msgstr ""
7496
 
7497
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1314
7498
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:1010
7499
  msgid "Shorthand for certain orderby/order combinations."
7500
  msgstr ""
7501
 
7502
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1332
7503
  msgid "Order Groups by which attribute."
7504
  msgstr ""
7505
 
7506
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1341
7507
  msgid "Group statuses to limit results to."
7508
  msgstr ""
7509
 
7510
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1353
7511
  msgid "Pass a user_id to limit to only Groups that this user is a member of."
7512
  msgstr ""
7513
 
7514
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1361
7515
  msgid "Get Groups that are children of the specified Group(s) IDs."
7516
  msgstr ""
7517
 
7518
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1371
7519
  msgid "Get Groups based on their meta data information."
7520
  msgstr ""
7521
 
7522
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1379
7523
  msgid "Ensure result set includes Groups with specific IDs."
7524
  msgstr ""
7525
 
7526
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1388
7527
  msgid "Ensure result set excludes Groups with specific IDs"
7528
  msgstr ""
7529
 
7530
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1397
7531
  msgid "Limit results set to a certain Group type."
7532
  msgstr ""
7533
 
7534
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1414
7535
  msgid "Whether results should include hidden Groups."
7536
  msgstr ""
7537
 
7538
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1422
7539
  msgid "Whether to fetch extra BP data about the returned groups."
7540
  msgstr ""
7541
 
7858
 
7859
  #: bp-members/bp-members-functions.php:2022
7860
  #: bp-members/bp-members-functions.php:2049
7861
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:645
7862
  msgid "Invalid activation key."
7863
  msgstr ""
7864
 
8666
  msgstr ""
8667
 
8668
  #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:70
8669
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:802
8670
  msgid "A unique numeric ID for the Member."
8671
  msgstr ""
8672
 
8674
  msgid "Sorry, there was a problem fetching the avatar."
8675
  msgstr ""
8676
 
8677
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:279
8678
  msgid "Sorry, member avatar upload is disabled."
8679
  msgstr ""
8680
 
8681
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:318
8682
  msgid "Sorry, there are no uploaded avatars for this user on this site."
8683
  msgstr ""
8684
 
8685
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:351
8686
  msgid "Sorry, there was a problem deleting the avatar."
8687
  msgstr ""
8688
 
8689
+ #: bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php:503
8690
  msgid "Whether to disable the default Gravatar fallback."
8691
  msgstr ""
8692
 
8722
  msgid "Reassign the deleted member's posts and links to this user ID."
8723
  msgstr ""
8724
 
8725
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:256
8726
  msgid "Sorry, you are not allowed to view members with the edit context."
8727
  msgstr ""
8728
 
8729
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:344
 
8730
  msgid "Sorry, you are not allowed to view members."
8731
  msgstr ""
8732
 
8733
  #. translators: %s: transport method name
8734
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:401
8735
  msgid "'%s' Transport Method not implemented."
8736
  msgstr ""
8737
 
8738
  #. translators: %s: transport method name
8739
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:422
8740
  msgid "'%s' Transport method not implemented."
8741
  msgstr ""
8742
 
8743
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:672
8744
  msgid "No extended profile data available as the component is inactive"
8745
  msgstr ""
8746
 
8747
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:713
8748
  msgid "The data for the user was not found."
8749
  msgstr ""
8750
 
8751
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:737
8752
  msgid "Assign a member type to a member, use a comma separated list of member types to assign more than one."
8753
  msgstr ""
8754
 
8755
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:756
8756
  msgid "The email address for the member."
8757
  msgstr ""
8758
 
8759
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:808
8760
  msgid "Display name for the member."
8761
  msgstr ""
8762
 
8763
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:816
8764
  msgid "The name used for that user in @-mentions."
8765
  msgstr ""
8766
 
8767
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:825
8768
  msgid "Profile URL of the member."
8769
  msgstr ""
8770
 
8771
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:832
8772
  msgid "An alphanumeric identifier for the Member."
8773
  msgstr ""
8774
 
8775
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:841
8776
  msgid "Member types associated with the member."
8777
  msgstr ""
8778
 
8779
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:851
8780
  msgid "Registration date for the member."
8781
  msgstr ""
8782
 
8783
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:858
8784
  msgid "Password for the member (never included)."
8785
  msgstr ""
8786
 
8787
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:867
8788
  msgid "Roles assigned to the member."
8789
  msgstr ""
8790
 
8791
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:875
8792
  msgid "All capabilities assigned to the user."
8793
  msgstr ""
8794
 
8795
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:881
8796
  msgid "Any extra capabilities assigned to the user."
8797
  msgstr ""
8798
 
8799
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:887
8800
  msgid "Member XProfile groups and its fields."
8801
  msgstr ""
8802
 
8803
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:893
8804
  msgid "Friendship relation with, current, logged in user."
8805
  msgstr ""
8806
 
8807
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:899
8808
  msgid "Slug of the friendship status with current logged in user."
8809
  msgstr ""
8810
 
8811
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:906
8812
  msgid "Last date the member was active on the site."
8813
  msgstr ""
8814
 
8815
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:922
8816
  msgid "The content of the latest activity posted by the member."
8817
  msgstr ""
8818
 
8819
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:947
8820
  msgid "Total number of friends for the member."
8821
  msgstr ""
8822
 
8823
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:975
8824
  msgid "Avatar URLs for the member."
8825
  msgstr ""
8826
 
8827
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:1019
8828
  msgid "Limit results to friends of a user."
8829
  msgstr ""
8830
 
8831
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:1027
8832
  msgid "Pass IDs of users to limit result set."
8833
  msgstr ""
8834
 
8835
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:1054
8836
  msgid "Whether to fetch extra BP data about the returned members."
8837
  msgstr ""
8838
 
8839
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:1062
8840
  msgid "Limit results set to certain type(s)."
8841
  msgstr ""
8842
 
8843
+ #: bp-members/classes/class-bp-rest-members-endpoint.php:1071
8844
  msgid "Limit results set to a certain XProfile field."
8845
  msgstr ""
8846
 
8849
  msgstr ""
8850
 
8851
  #: bp-members/classes/class-bp-rest-signup-endpoint.php:99
8852
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:892
8853
  msgid "Activation key of the signup."
8854
  msgstr ""
8855
 
8856
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:275
8857
  msgid "Invalid signup id."
8858
  msgstr ""
8859
 
8860
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:436
8861
  msgid "Cannot create new signup."
8862
  msgstr ""
8863
 
8864
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:532
8865
  msgid "Could not delete signup."
8866
  msgstr ""
8867
 
8868
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:605
8869
  msgid "Fail to activate the signup."
8870
  msgstr ""
8871
 
8872
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:780
8873
  msgid "Passwords cannot be empty or contain the \"\\\" character."
8874
  msgstr ""
8875
 
8876
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:831
8877
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:922
8878
  msgid "Password for the new user (never included)."
8879
  msgstr ""
8880
 
8881
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:874
8882
  msgid "A unique numeric ID for the signup."
8883
  msgstr ""
8884
 
8885
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:880
8886
  msgid "The username of the user the signup is for."
8887
  msgstr ""
8888
 
8889
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:886
8890
  msgid "The email for the user the signup is for."
8891
  msgstr ""
8892
 
8893
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:898
8894
  msgid "The registered date for the user, in the site's timezone."
8895
  msgstr ""
8896
 
8897
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:905
8898
  msgid "The date the activation email was sent to the user, in the site's timezone."
8899
  msgstr ""
8900
 
8901
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:911
8902
  msgid "The number of times the activation email was sent to the user."
8903
  msgstr ""
8904
 
8905
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:918
8906
  msgid "The signup meta information"
8907
  msgstr ""
8908
 
8909
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:934
8910
  msgid "The new user's full name."
8911
  msgstr ""
8912
 
8913
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:946
8914
  msgid "Unique site name (slug) of the new user's child site."
8915
  msgstr ""
8916
 
8917
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:953
8918
  msgid "Title of the new user's child site."
8919
  msgstr ""
8920
 
8921
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:960
8922
  msgid "Search engine visibility of the new user's site."
8923
  msgstr ""
8924
 
8925
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:967
8926
  msgid "Language to use for the new user's site."
8927
  msgstr ""
8928
 
8929
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:996
8930
  msgid "Total number of signups to return."
8931
  msgstr ""
8932
 
8933
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:1004
8934
  msgid "Offset the result set by a specific number of items."
8935
  msgstr ""
8936
 
8937
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:1021
8938
  msgid "Order by a specific parameter (default: signup_id)."
8939
  msgstr ""
8940
 
8941
+ #: bp-members/classes/class-bp-rest-signup-endpoint.php:1039
8942
  msgid "Specific user login to return."
8943
  msgstr ""
8944
 
9479
  msgid "ID of one of the message of the Thread."
9480
  msgstr ""
9481
 
9482
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:207
9483
  msgid "Sorry, you cannot view the messages."
9484
  msgstr ""
9485
 
9486
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:270
 
9487
  msgid "Sorry, you are not allowed to see this thread."
9488
  msgstr ""
9489
 
9490
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:283
9491
  msgid "Sorry, this thread does not exist."
9492
  msgstr ""
9493
 
9494
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:325
9495
  msgid "There was an error trying to create the message."
9496
  msgstr ""
9497
 
9498
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:384
9499
  msgid "Sorry, you need to be logged in to create a message."
9500
  msgstr ""
9501
 
9515
  msgid "Sorry, you cannot remove the message from your starred box."
9516
  msgstr ""
9517
 
9518
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:605
9519
  msgid "Sorry, you are not allowed to star/unstar messages."
9520
  msgstr ""
9521
 
9522
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:658
9523
  msgid "There was an error trying to delete the thread."
9524
  msgstr ""
9525
 
9526
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1015
9527
  msgid "ID of the Messages Thread."
9528
  msgstr ""
9529
 
9530
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1021
9531
  msgid "ID of the Messages Thread. Required when replying to an existing Thread."
9532
  msgstr ""
9533
 
9534
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1026
9535
  msgid "The user ID of the Message sender."
9536
  msgstr ""
9537
 
9538
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1037
9539
  msgid "Subject of the Message initializing the Thread."
9540
  msgstr ""
9541
 
9542
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1041
9543
  msgid "Content of the Message to add to the Thread."
9544
  msgstr ""
9545
 
9546
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1048
9547
  msgid "The list of the recipients user IDs of the Message."
9548
  msgstr ""
9549
 
9550
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1060
9551
  msgid "By default the latest message of the thread will be updated. Specify this message ID to edit another message of the thread."
9552
  msgstr ""
9553
 
9554
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1072
9555
  msgid "The user ID to remove from the thread"
9556
  msgstr ""
9557
 
9558
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1108
9559
  msgid "A unique numeric ID for the Thread."
9560
  msgstr ""
9561
 
9562
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1113
9563
  msgid "The ID of the latest message of the Thread."
9564
  msgstr ""
9565
 
9566
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1119
9567
  msgid "The ID of latest sender of the Thread."
9568
  msgstr ""
9569
 
9570
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1125
9571
  msgid "Title of the latest message of the Thread."
9572
  msgstr ""
9573
 
9574
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1133
9575
  msgid "Title of the latest message of the Thread, as it exists in the database."
9576
  msgstr ""
9577
 
9578
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1139
9579
  msgid "Title of the latest message of the Thread, transformed for display."
9580
  msgstr ""
9581
 
9582
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1149
9583
  msgid "Summary of the latest message of the Thread."
9584
  msgstr ""
9585
 
9586
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1158
9587
  msgid "Summary for the latest message of the Thread, as it exists in the database."
9588
  msgstr ""
9589
 
9590
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1163
9591
  msgid "HTML summary for the latest message of the Thread, transformed for display."
9592
  msgstr ""
9593
 
9594
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1171
9595
  msgid "Content of the latest message of the Thread."
9596
  msgstr ""
9597
 
9598
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1180
9599
  msgid "Content for the latest message of the Thread, as it exists in the database."
9600
  msgstr ""
9601
 
9602
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1185
9603
  msgid "HTML content for the latest message of the Thread, transformed for display."
9604
  msgstr ""
9605
 
9606
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1194
9607
  msgid "The date the latest message of the Thread, in the site's timezone."
9608
  msgstr ""
9609
 
9610
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1201
9611
  msgid "Total count of unread messages into the Thread for the requested user."
9612
  msgstr ""
9613
 
9614
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1207
9615
  msgid "The list of user IDs for all messages in the Thread."
9616
  msgstr ""
9617
 
9618
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1216
9619
  msgid "The list of recipient User Objects involved into the Thread."
9620
  msgstr ""
9621
 
9622
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1224
9623
  msgid "List of message objects for the thread."
9624
  msgstr ""
9625
 
9626
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1233
9627
  msgid "List of starred message IDs."
9628
  msgstr ""
9629
 
9630
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1271
9631
  msgid "Filter the result by box."
9632
  msgstr ""
9633
 
9634
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1280
9635
  msgid "Filter the result by thread status."
9636
  msgstr ""
9637
 
9638
+ #: bp-messages/classes/class-bp-rest-messages-endpoint.php:1289
9639
  msgid "Limit result to messages created by a specific user."
9640
  msgstr ""
9641
 
9810
  msgstr ""
9811
 
9812
  #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:60
9813
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:753
9814
  msgid "A unique numeric ID for the notification."
9815
  msgstr ""
9816
 
9817
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:169
9818
  msgid "Sorry, you are not allowed to see the notifications."
9819
  msgstr ""
9820
 
9821
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:232
9822
  msgid "Sorry, you are not allowed to see the notification."
9823
  msgstr ""
9824
 
9825
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:244
9826
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:460
9827
  msgid "Invalid notification ID."
9828
  msgstr ""
9829
 
9830
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:254
9831
  msgid "Sorry, you cannot view this notification."
9832
  msgstr ""
9833
 
9834
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:290
9835
  msgid "Cannot create new notification."
9836
  msgstr ""
9837
 
9838
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:365
9839
  msgid "Notification is already with the status you are trying to update into."
9840
  msgstr ""
9841
 
9842
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:380
9843
  msgid "Cannot update the status of this notification."
9844
  msgstr ""
9845
 
9846
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:759
9847
  msgid "The ID of the user the notification is addressed to."
9848
  msgstr ""
9849
 
9850
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:765
9851
  msgid "The ID of the item associated with the notification."
9852
  msgstr ""
9853
 
9854
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:770
9855
  msgid "The ID of the secondary item associated with the notification."
9856
  msgstr ""
9857
 
9858
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:775
9859
  msgid "The name of the BuddyPress component the notification relates to."
9860
  msgstr ""
9861
 
9862
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:780
9863
  msgid "The name of the component's action the notification is about."
9864
  msgstr ""
9865
 
9866
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:784
9867
  msgid "The date the notification was created, in the site's timezone."
9868
  msgstr ""
9869
 
9870
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:791
9871
  msgid "Whether it's a new notification or not."
9872
  msgstr ""
9873
 
9874
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:821
9875
  msgid "Name of the field to order according to."
9876
  msgstr ""
9877
 
9878
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:839
9879
  msgid "Limit result set to notifications associated with a specific component"
9880
  msgstr ""
9881
 
9882
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:847
9883
  msgid "Limit result set to notifications associated with a specific component's action name."
9884
  msgstr ""
9885
 
9886
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:855
9887
  msgid "Limit result set to notifications addressed to a specific user."
9888
  msgstr ""
9889
 
9890
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:863
9891
  msgid "Limit result set to notifications associated with a specific item ID."
9892
  msgstr ""
9893
 
9894
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:871
9895
  msgid "Limit result set to notifications associated with a specific secondary item ID."
9896
  msgstr ""
9897
 
9898
+ #: bp-notifications/classes/class-bp-rest-notifications-endpoint.php:879
9899
  msgid "Limit result set to items from specific states."
9900
  msgstr ""
9901
 
10490
  #: bp-templates/bp-legacy/buddypress/members/single/friends.php:22
10491
  #: bp-templates/bp-legacy/buddypress/members/single/groups.php:22
10492
  #: bp-templates/bp-nouveau/includes/blogs/functions.php:106
10493
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:640
10494
  #: bp-templates/bp-nouveau/includes/members/functions.php:97
10495
  msgid "Last Active"
10496
  msgstr ""
10726
 
10727
  #: bp-templates/bp-legacy/buddypress/groups/index.php:111
10728
  #: bp-templates/bp-legacy/buddypress/members/single/groups.php:23
10729
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:641
10730
  msgid "Most Members"
10731
  msgstr ""
10732
 
10733
  #: bp-templates/bp-legacy/buddypress/groups/index.php:112
10734
  #: bp-templates/bp-legacy/buddypress/members/single/groups.php:24
10735
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:642
10736
  msgid "Newly Created"
10737
  msgstr ""
10738
 
11074
 
11075
  #. translators: accessibility text
11076
  #: bp-templates/bp-legacy/buddypress/members/single/groups/invites.php:21
11077
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:1264
11078
  msgid "Group invitations"
11079
  msgstr ""
11080
 
12120
  msgstr ""
12121
 
12122
  #: bp-templates/bp-nouveau/includes/activity/functions.php:256
12123
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:572
12124
  msgid "My Groups"
12125
  msgstr ""
12126
 
12694
  msgid "Group invites preferences saved."
12695
  msgstr ""
12696
 
12697
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:556
12698
  msgid "All Groups"
12699
  msgstr ""
12700
 
12701
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:741
12702
  msgid "Group front page"
12703
  msgstr ""
12704
 
12705
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:744
12706
  msgid "Configure the default front page for groups."
12707
  msgstr ""
12708
 
12709
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:747
12710
  msgid "Group navigation"
12711
  msgstr ""
12712
 
12713
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:750
12714
  msgid "Customize the navigation menu for groups. See your changes by navigating to a group in the live-preview window."
12715
  msgstr ""
12716
 
12717
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:851
12718
  msgid "Enable custom front pages for groups."
12719
  msgstr ""
12720
 
12721
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:857
12722
  msgid "Enable widget region for group homepages. When enabled, the site admin can add widgets to group pages via the Widgets panel."
12723
  msgstr ""
12724
 
12725
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:863
12726
  msgid "Display the group description in the body of the group's front page."
12727
  msgstr ""
12728
 
12729
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:869
12730
  msgid "Display the group navigation vertically."
12731
  msgstr ""
12732
 
12733
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:875
12734
  msgid "Use tab styling for primary navigation."
12735
  msgstr ""
12736
 
12737
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:881
12738
  msgid "Use tab styling for secondary navigation."
12739
  msgstr ""
12740
 
12741
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:887
12742
  msgid "Use tab styling for the group creation process."
12743
  msgstr ""
12744
 
12745
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:894
12746
  msgid "Reorder the primary navigation for a group."
12747
  msgstr ""
12748
 
12749
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:900
12750
  msgctxt "Customizer control label"
12751
  msgid "Groups"
12752
  msgstr ""
12753
 
12754
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:907
12755
  msgid "Group > Members"
12756
  msgstr ""
12757
 
12758
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:914
12759
  msgid "Use column navigation for the Groups directory."
12760
  msgstr ""
12761
 
12762
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:920
12763
  msgid "Use tab styling for Groups directory navigation."
12764
  msgstr ""
12765
 
12766
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:1239
12767
  msgid "Pending Group membership requests"
12768
  msgstr ""
12769
 
12770
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:1244
12771
  msgid "Accepted Group membership requests"
12772
  msgstr ""
12773
 
12774
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:1249
12775
  msgid "Rejected Group membership requests"
12776
  msgstr ""
12777
 
12778
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:1254
12779
  msgid "Group Administrator promotions"
12780
  msgstr ""
12781
 
12782
+ #: bp-templates/bp-nouveau/includes/groups/functions.php:1259
12783
  msgid "Group Moderator promotions"
12784
  msgstr ""
12785
 
13201
  msgid "The value(s) for the field data."
13202
  msgstr ""
13203
 
13204
+ #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:137
13205
+ msgid "Sorry, the profile field value is not viewable for this user."
 
 
 
 
13206
  msgstr ""
13207
 
13208
+ #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:149
13209
+ #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:203
13210
+ #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:336
13211
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:213
13212
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:636
13213
+ msgid "Invalid field ID."
13214
  msgstr ""
13215
 
13216
+ #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:226
13217
  msgid "Cannot save XProfile data."
13218
  msgstr ""
13219
 
13220
+ #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:278
13221
+ msgid "Sorry, you cannot save XProfile field data."
13222
  msgstr ""
13223
 
13224
+ #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:301
13225
+ msgid "Sorry, you need to be logged in to save XProfile data."
13226
  msgstr ""
13227
 
13228
  #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:356
13242
  msgstr ""
13243
 
13244
  #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:562
13245
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1073
13246
  msgid "Value for the field, as it exists in the database."
13247
  msgstr ""
13248
 
13249
  #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:567
13250
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1078
13251
  msgid "Unserialized value for the field, regular string will be casted as array."
13252
  msgstr ""
13253
 
13254
  #: bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php:576
13255
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1084
13256
  msgid "HTML value for the field, transformed for display."
13257
  msgstr ""
13258
 
13261
  msgstr ""
13262
 
13263
  #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:73
13264
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:724
13265
  msgid "A unique numeric ID for the group of profile fields."
13266
  msgstr ""
13267
 
13268
  #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:240
13269
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:420
13270
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:521
13271
  msgid "Invalid field group ID."
13272
  msgstr ""
13273
 
13274
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:321
13275
  msgid "Required param missing."
13276
  msgstr ""
13277
 
13278
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:333
13279
  msgid "Cannot create new XProfile field group."
13280
  msgstr ""
13281
 
13282
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:382
13283
  msgid "Sorry, you are not allowed to view this XProfile field group."
13284
  msgstr ""
13285
 
13286
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:438
13287
  msgid "Cannot update XProfile field group."
13288
  msgstr ""
13289
 
13290
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:531
13291
  msgid "Could not delete XProfile field group."
13292
  msgstr ""
13293
 
13294
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:730
13295
  msgid "The name of group of profile fields."
13296
  msgstr ""
13297
 
13298
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:738
13299
  msgid "The description of the group of profile fields."
13300
  msgstr ""
13301
 
13302
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:746
13303
  msgid "Content for the group of profile fields, as it exists in the database."
13304
  msgstr ""
13305
 
13306
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:751
13307
  msgid "HTML content for the group of profile fields, transformed for display."
13308
  msgstr ""
13309
 
13310
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:760
13311
  msgid "The order of the group of profile fields."
13312
  msgstr ""
13313
 
13314
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:765
13315
  msgid "Whether the group of profile fields can be deleted or not."
13316
  msgstr ""
13317
 
13318
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:771
13319
  msgid "The fields associated with this group of profile fields."
13320
  msgstr ""
13321
 
13322
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:798
13323
  msgid "ID of the field group that have fields."
13324
  msgstr ""
13325
 
13326
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:806
13327
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:831
13328
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1122
13329
  msgid "Whether to hide profile groups of fields that do not have any profile fields or not."
13330
  msgstr ""
13331
 
13332
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:814
13333
  #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:73
13334
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1130
13335
  msgid "Required if you want to load a specific user's data."
13336
  msgstr ""
13337
 
13338
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:822
13339
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1138
13340
  msgid "Limit fields by those restricted to a given member type, or array of member types. If `$user_id` is provided, the value of `$member_type` will be overridden by the member types of the provided user. The special value of 'any' will return only those fields that are unrestricted by member type - i.e., those applicable to any type."
13341
  msgstr ""
13342
 
13343
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:839
13344
  msgid "Whether to fetch the fields for each group."
13345
  msgstr ""
13346
 
13347
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:847
13348
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1155
13349
  msgid "Whether to fetch data for each field. Requires a $user_id."
13350
  msgstr ""
13351
 
13352
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:855
13353
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1163
13354
  msgid "Whether to fetch the visibility level for each field."
13355
  msgstr ""
13356
 
13357
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:863
13358
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1171
13359
  msgid "Ensure result set excludes specific profile field groups."
13360
  msgstr ""
13361
 
13362
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:872
13363
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1180
13364
  msgid "Ensure result set excludes specific profile fields."
13365
  msgstr ""
13366
 
13367
+ #: bp-xprofile/classes/class-bp-rest-xprofile-field-groups-endpoint.php:881
13368
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1189
13369
  msgid "Whether to pre-fetch xprofilemeta for all retrieved groups, fields, and data."
13370
  msgstr ""
13371
 
13372
  #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:63
13373
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:967
13374
  msgid "A unique numeric ID for the profile field."
13375
  msgstr ""
13376
 
13390
  msgid "Cannot create new XProfile field."
13391
  msgstr ""
13392
 
13393
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:422
13394
  msgid "Sorry, you are not allowed to create a XProfile field."
13395
  msgstr ""
13396
 
13406
  msgid "Could not delete XProfile field."
13407
  msgstr ""
13408
 
13409
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:624
 
13410
  msgid "Sorry, you are not allowed to delete this field."
13411
  msgstr ""
13412
 
13413
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:900
13414
  msgid "Default visibility for the profile field."
13415
  msgstr ""
13416
 
13417
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:908
13418
  msgid "Whether to allow members to set the visibility for the profile field data or not."
13419
  msgstr ""
13420
 
13421
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:916
13422
  msgid "Autolink status for this profile field"
13423
  msgstr ""
13424
 
13425
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:973
13426
  msgid "The ID of the group the field is part of."
13427
  msgstr ""
13428
 
13429
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:978
13430
  msgid "The ID of the parent field."
13431
  msgstr ""
13432
 
13433
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:983
13434
  msgid "The type for the profile field."
13435
  msgstr ""
13436
 
13437
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:992
13438
  msgid "The name of the profile field."
13439
  msgstr ""
13440
 
13441
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1000
13442
  msgid "The description of the profile field."
13443
  msgstr ""
13444
 
13445
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1008
13446
  msgid "Content for the profile field, as it exists in the database."
13447
  msgstr ""
13448
 
13449
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1013
13450
  msgid "HTML content for the profile field, transformed for display."
13451
  msgstr ""
13452
 
13453
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1022
13454
  msgid "Whether the profile field must have a value."
13455
  msgstr ""
13456
 
13457
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1027
13458
  msgid "Whether the profile field can be deleted or not."
13459
  msgstr ""
13460
 
13461
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1033
13462
  msgid "The order of the profile field into the group of fields."
13463
  msgstr ""
13464
 
13465
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1038
13466
  msgid "The order of the option into the profile field list of options"
13467
  msgstr ""
13468
 
13469
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1043
13470
  msgid "The way profile field's options are ordered."
13471
  msgstr ""
13472
 
13473
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1050
13474
  msgid "Whether the option is the default one for the profile field."
13475
  msgstr ""
13476
 
13477
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1055
13478
  msgid "Who may see the saved value for this profile field."
13479
  msgstr ""
13480
 
13481
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1062
13482
  msgid "Options of the profile field."
13483
  msgstr ""
13484
 
13485
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1068
13486
  msgid "The saved value for this profile field."
13487
  msgstr ""
13488
 
13489
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1114
13490
  msgid "ID of the profile group of fields that have profile fields"
13491
  msgstr ""
13492
 
13493
+ #: bp-xprofile/classes/class-bp-rest-xprofile-fields-endpoint.php:1147
13494
  msgid "Whether to hide profile fields where the user has not provided data or not."
13495
  msgstr ""
13496
 
class-buddypress.php CHANGED
@@ -303,7 +303,7 @@ class BuddyPress {
303
 
304
  /** Versions **********************************************************/
305
 
306
- $this->version = '7.2.0';
307
  $this->db_version = 12385;
308
 
309
  /** Loading ***********************************************************/
303
 
304
  /** Versions **********************************************************/
305
 
306
+ $this->version = '7.2.1';
307
  $this->db_version = 12385;
308
 
309
  /** Loading ***********************************************************/
readme.txt CHANGED
@@ -5,8 +5,8 @@ License: GPLv2 or later
5
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
6
  Requires at least: 4.9
7
  Requires PHP: 5.6
8
- Tested up to: 5.6
9
- Stable tag: 7.2.0
10
 
11
  BuddyPress helps site builders & developers add community features to their websites, with user profiles, activity streams, and more!
12
 
@@ -125,6 +125,9 @@ Try <a href="https://wordpress.org/plugins/bbpress/">bbPress</a>. It integrates
125
 
126
  == Upgrade Notice ==
127
 
 
 
 
128
  = 7.2.0 =
129
  See: https://codex.buddypress.org/releases/version-7-2-0/
130
 
@@ -181,6 +184,9 @@ See: https://codex.buddypress.org/releases/version-4-0-0/
181
 
182
  == Changelog ==
183
 
 
 
 
184
  = 7.2.0 =
185
  See: https://codex.buddypress.org/releases/version-7-2-0/
186
 
5
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
6
  Requires at least: 4.9
7
  Requires PHP: 5.6
8
+ Tested up to: 5.7
9
+ Stable tag: 7.2.1
10
 
11
  BuddyPress helps site builders & developers add community features to their websites, with user profiles, activity streams, and more!
12
 
125
 
126
  == Upgrade Notice ==
127
 
128
+ = 7.2.1 =
129
+ See: https://codex.buddypress.org/releases/version-7-2-1/
130
+
131
  = 7.2.0 =
132
  See: https://codex.buddypress.org/releases/version-7-2-0/
133
 
184
 
185
  == Changelog ==
186
 
187
+ = 7.2.1 =
188
+ See: https://codex.buddypress.org/releases/version-7-2-1/
189
+
190
  = 7.2.0 =
191
  See: https://codex.buddypress.org/releases/version-7-2-0/
192