BuddyPress - Version 7.3.0

Version Description

See: https://codex.buddypress.org/releases/version-7-3-0/

Download this release

Release Info

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

Code changes from version 7.2.1 to 7.3.0

bp-activity/classes/class-bp-rest-activity-endpoint.php CHANGED
@@ -827,7 +827,7 @@ class BP_REST_Activity_Endpoint extends WP_REST_Controller {
827
  )
828
  );
829
 
830
- if ( is_user_logged_in() && bp_activity_can_favorite() ) {
831
  $retval = true;
832
  }
833
 
827
  )
828
  );
829
 
830
+ if ( is_user_logged_in() && bp_activity_can_favorite() && $this->can_see( $request ) ) {
831
  $retval = true;
832
  }
833
 
bp-groups/classes/class-bp-rest-group-membership-endpoint.php CHANGED
@@ -661,7 +661,7 @@ class BP_REST_Group_Membership_Endpoint extends WP_REST_Controller {
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.
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 && ! groups_is_user_banned( $user->ID, $group->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.
bp-groups/classes/class-bp-rest-groups-endpoint.php CHANGED
@@ -384,7 +384,10 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
384
  )
385
  );
386
 
387
- if ( is_user_logged_in() && bp_user_can_create_groups() ) {
 
 
 
388
  $retval = true;
389
  }
390
 
@@ -983,7 +986,7 @@ class BP_REST_Groups_Endpoint extends WP_REST_Controller {
983
  * @return bool
984
  */
985
  protected function can_user_delete_or_update( $group ) {
986
- return ( bp_current_user_can( 'bp_moderate' ) || bp_loggedin_user_id() === $group->creator_id );
987
  }
988
 
989
  /**
384
  )
385
  );
386
 
387
+ $current_user_id = (int) bp_loggedin_user_id();
388
+ $creator_id = (int) $request->get_param( 'creator_id' );
389
+
390
+ if ( ( $current_user_id && $current_user_id === $creator_id && bp_user_can_create_groups() ) || bp_current_user_can( 'bp_moderate' ) ) {
391
  $retval = true;
392
  }
393
 
986
  * @return bool
987
  */
988
  protected function can_user_delete_or_update( $group ) {
989
+ return ( bp_current_user_can( 'bp_moderate' ) || groups_is_user_admin( bp_loggedin_user_id(), $group->id ) );
990
  }
991
 
992
  /**
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.1
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.3.0
19
  * Text Domain: buddypress
20
  * Domain Path: /bp-languages/
21
  * License: GPLv2 or later (license.txt)
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-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"
@@ -1318,7 +1318,7 @@ msgstr ""
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 ""
@@ -1326,7 +1326,7 @@ msgstr ""
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 ""
@@ -1348,7 +1348,7 @@ 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."
@@ -1733,8 +1733,8 @@ msgstr ""
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
 
@@ -6970,7 +6970,7 @@ msgstr ""
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
 
@@ -7377,165 +7377,165 @@ msgstr ""
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
 
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-04-14T04:36:34+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"
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:1274
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 ""
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:1282
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 ""
1348
  msgstr ""
1349
 
1350
  #: bp-activity/classes/class-bp-rest-activity-endpoint.php:1456
1351
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1326
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."
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:479
1737
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:577
1738
  msgid "Invalid group ID."
1739
  msgstr ""
1740
 
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:1134
6974
  msgid "A unique numeric ID for the Group."
6975
  msgstr ""
6976
 
7377
  msgid "Cannot create new group."
7378
  msgstr ""
7379
 
7380
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:422
7381
  msgid "Cannot update existing group."
7382
  msgstr ""
7383
 
7384
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:469
7385
  msgid "Sorry, you are not allowed to update this group."
7386
  msgstr ""
7387
 
7388
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:487
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:526
7393
  msgid "Could not delete the group."
7394
  msgstr ""
7395
 
7396
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:567
7397
  msgid "Sorry, you are not allowed to delete this group."
7398
  msgstr ""
7399
 
7400
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:585
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:620
7405
  msgid "Invalid user ID."
7406
  msgstr ""
7407
 
7408
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:690
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:1075
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:1088
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:1097
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:1140
7425
  msgid "The ID of the user who created the Group."
7426
  msgstr ""
7427
 
7428
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1146
7429
  msgid "The name of the Group."
7430
  msgstr ""
7431
 
7432
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1155
7433
  msgid "The URL-friendly slug for the Group."
7434
  msgstr ""
7435
 
7436
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1163
7437
  msgid "The permalink to the Group on the site."
7438
  msgstr ""
7439
 
7440
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1170
7441
  msgid "The description of the Group."
7442
  msgstr ""
7443
 
7444
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1179
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:1184
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:1193
7453
  msgid "The status of the Group."
7454
  msgstr ""
7455
 
7456
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1203
7457
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1409
7458
  msgid "Whether the Group has a forum enabled or not."
7459
  msgstr ""
7460
 
7461
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1208
7462
  msgid "ID of the parent Group."
7463
  msgstr ""
7464
 
7465
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1213
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:1220
7470
  msgid "The type(s) of the Group."
7471
  msgstr ""
7472
 
7473
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1230
7474
  msgid "Group administrators."
7475
  msgstr ""
7476
 
7477
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1239
7478
  msgid "Group moderators."
7479
  msgstr ""
7480
 
7481
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1248
7482
  msgid "Count of all Group members."
7483
  msgstr ""
7484
 
7485
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1254
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:1261
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:1289
7494
  msgid "Avatar URLs for the group."
7495
  msgstr ""
7496
 
7497
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1317
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:1335
7503
  msgid "Order Groups by which attribute."
7504
  msgstr ""
7505
 
7506
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1344
7507
  msgid "Group statuses to limit results to."
7508
  msgstr ""
7509
 
7510
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1356
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:1364
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:1374
7519
  msgid "Get Groups based on their meta data information."
7520
  msgstr ""
7521
 
7522
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1382
7523
  msgid "Ensure result set includes Groups with specific IDs."
7524
  msgstr ""
7525
 
7526
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1391
7527
  msgid "Ensure result set excludes Groups with specific IDs"
7528
  msgstr ""
7529
 
7530
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1400
7531
  msgid "Limit results set to a certain Group type."
7532
  msgstr ""
7533
 
7534
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1417
7535
  msgid "Whether results should include hidden Groups."
7536
  msgstr ""
7537
 
7538
+ #: bp-groups/classes/class-bp-rest-groups-endpoint.php:1425
7539
  msgid "Whether to fetch extra BP data about the returned groups."
7540
  msgstr ""
7541
 
class-buddypress.php CHANGED
@@ -303,7 +303,7 @@ class BuddyPress {
303
 
304
  /** Versions **********************************************************/
305
 
306
- $this->version = '7.2.1';
307
  $this->db_version = 12385;
308
 
309
  /** Loading ***********************************************************/
303
 
304
  /** Versions **********************************************************/
305
 
306
+ $this->version = '7.3.0';
307
  $this->db_version = 12385;
308
 
309
  /** Loading ***********************************************************/
cli/src/activity.php CHANGED
@@ -692,7 +692,7 @@ class Activity extends BuddyPressCommand {
692
  }
693
 
694
  // stolen from groups_join_group.
695
- $r['action'] = sprintf( '%1$s posted an update in the group %2$s', bp_core_get_userlink( $r['user-id'] ), '<a href="' . bp_get_group_permalink( $group_obj ) . '">' . esc_attr( $group_obj->name ) . '</a>' );
696
  } else {
697
  // old way, for some other kind of update.
698
  $r['action'] = sprintf( '%s posted an update', bp_core_get_userlink( $r['user-id'] ) );
@@ -752,7 +752,7 @@ class Activity extends BuddyPressCommand {
752
  $comment = get_comment( $comment_id );
753
 
754
  $post_id = $comment_info[0]->comment_post_id;
755
- $post = get_post( $post_id );
756
 
757
  if ( is_multisite() ) {
758
  restore_current_blog();
@@ -799,7 +799,7 @@ class Activity extends BuddyPressCommand {
799
  } else {
800
  // groan - have to fake this.
801
  if ( '' === $r['user-id'] ) {
802
- $user = get_user_by( 'email', $comment->comment_author_email );
803
  $r['user-id'] = ( empty( $user ) )
804
  ? $this->get_random_user_id()
805
  : $user->ID;
692
  }
693
 
694
  // stolen from groups_join_group.
695
+ $r['action'] = sprintf( '%1$s posted an update in the group %2$s', bp_core_get_userlink( $r['user-id'] ), '<a href="' . bp_get_group_permalink( $group_obj ) . '">' . esc_attr( $group_obj->name ) . '</a>' );
696
  } else {
697
  // old way, for some other kind of update.
698
  $r['action'] = sprintf( '%s posted an update', bp_core_get_userlink( $r['user-id'] ) );
752
  $comment = get_comment( $comment_id );
753
 
754
  $post_id = $comment_info[0]->comment_post_id;
755
+ $post = get_post( $post_id );
756
 
757
  if ( is_multisite() ) {
758
  restore_current_blog();
799
  } else {
800
  // groan - have to fake this.
801
  if ( '' === $r['user-id'] ) {
802
+ $user = get_user_by( 'email', $comment->comment_author_email );
803
  $r['user-id'] = ( empty( $user ) )
804
  ? $this->get_random_user_id()
805
  : $user->ID;
cli/src/components.php CHANGED
@@ -186,19 +186,15 @@ class Components extends BuddyPressCommand {
186
  $type = $assoc_args['type'];
187
 
188
  // Get components.
189
- $components = bp_core_get_components( $type );
190
 
191
  // Active components.
192
- $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) );
193
 
194
  // Core component is always active.
195
- if ( 'optional' !== $type ) {
196
  if ( ! isset( $active_components['core'] ) ) {
197
- $active_components = [
198
- 'core' => $components['core'],
199
- ];
200
- } else {
201
- $active_components['core'] = $components['core'];
202
  }
203
  }
204
 
@@ -209,48 +205,42 @@ class Components extends BuddyPressCommand {
209
  switch ( $assoc_args['status'] ) {
210
  case 'all':
211
  $index = 0;
212
- foreach ( $components as $name => $labels ) {
213
  $index++;
214
  $current_components[] = array(
215
  'number' => $index,
216
- 'id' => $name,
217
- 'status' => $this->verify_component_status( $name ),
218
- 'title' => $labels['title'],
219
- 'description' => $labels['description'],
220
  );
221
  }
222
  break;
223
 
224
  case 'active':
225
  $index = 0;
226
- foreach ( array_keys( $active_components ) as $component ) {
227
  $index++;
228
-
229
- $info = $components[ $component ];
230
-
231
  $current_components[] = array(
232
  'number' => $index,
233
- 'id' => $component,
234
- 'status' => 'Active',
235
- 'title' => $info['title'],
236
- 'description' => $info['description'],
237
  );
238
  }
239
  break;
240
 
241
  case 'inactive':
242
  $index = 0;
243
- foreach ( $inactive_components as $component ) {
244
  $index++;
245
-
246
- $info = $components[ $component ];
247
-
248
  $current_components[] = array(
249
  'number' => $index,
250
- 'id' => $component,
251
- 'status' => 'Inactive',
252
- 'title' => $info['title'],
253
- 'description' => $info['description'],
254
  );
255
  }
256
  break;
@@ -267,13 +257,15 @@ class Components extends BuddyPressCommand {
267
  /**
268
  * Does the component exist?
269
  *
270
- * @param string $component Component.
271
  * @return bool
272
  */
273
- protected function component_exists( $component ) {
274
- $keys = array_keys( bp_core_get_components() );
275
-
276
- return in_array( $component, $keys, true );
 
 
277
  }
278
 
279
  /**
@@ -281,16 +273,16 @@ class Components extends BuddyPressCommand {
281
  *
282
  * @since 1.7.0
283
  *
284
- * @param string $id Component id.
285
  * @return string
286
  */
287
- protected function verify_component_status( $id ) {
288
- $active = 'Active';
289
 
290
- if ( 'core' === $id ) {
291
  return $active;
292
  }
293
 
294
- return bp_is_active( $id ) ? $active : 'Inactive';
295
  }
296
  }
186
  $type = $assoc_args['type'];
187
 
188
  // Get components.
189
+ $components = (array) bp_core_get_components( $type );
190
 
191
  // Active components.
192
+ $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components', array() ) );
193
 
194
  // Core component is always active.
195
+ if ( 'optional' !== $type && isset( $components['core'] ) ) {
196
  if ( ! isset( $active_components['core'] ) ) {
197
+ $active_components = array_merge( $active_components, [ 'core' => $components['core'] ] );
 
 
 
 
198
  }
199
  }
200
 
205
  switch ( $assoc_args['status'] ) {
206
  case 'all':
207
  $index = 0;
208
+ foreach ( $components as $component_key => $component ) {
209
  $index++;
210
  $current_components[] = array(
211
  'number' => $index,
212
+ 'id' => $component_key,
213
+ 'status' => $this->verify_component_status( $component_key ),
214
+ 'title' => esc_html( $component['title'] ),
215
+ 'description' => html_entity_decode( $component['description'] ),
216
  );
217
  }
218
  break;
219
 
220
  case 'active':
221
  $index = 0;
222
+ foreach ( array_keys( $active_components ) as $component_key ) {
223
  $index++;
 
 
 
224
  $current_components[] = array(
225
  'number' => $index,
226
+ 'id' => $component_key,
227
+ 'status' => $this->verify_component_status( $component_key ),
228
+ 'title' => esc_html( $components[ $component_key ]['title'] ),
229
+ 'description' => html_entity_decode( $components[ $component_key ]['description'] ),
230
  );
231
  }
232
  break;
233
 
234
  case 'inactive':
235
  $index = 0;
236
+ foreach ( $inactive_components as $component_key ) {
237
  $index++;
 
 
 
238
  $current_components[] = array(
239
  'number' => $index,
240
+ 'id' => $component_key,
241
+ 'status' => $this->verify_component_status( $component_key ),
242
+ 'title' => esc_html( $components[ $component_key ]['title'] ),
243
+ 'description' => html_entity_decode( $components[ $component_key ]['description'] ),
244
  );
245
  }
246
  break;
257
  /**
258
  * Does the component exist?
259
  *
260
+ * @param string $component_key Component key.
261
  * @return bool
262
  */
263
+ protected function component_exists( $component_key ) {
264
+ return in_array(
265
+ $component_key,
266
+ array_keys( bp_core_get_components() ),
267
+ true
268
+ );
269
  }
270
 
271
  /**
273
  *
274
  * @since 1.7.0
275
  *
276
+ * @param string $component_key Component key.
277
  * @return string
278
  */
279
+ protected function verify_component_status( $component_key ) {
280
+ $active = 'active';
281
 
282
+ if ( 'core' === $component_key ) {
283
  return $active;
284
  }
285
 
286
+ return bp_is_active( $component_key ) ? $active : 'inactive';
287
  }
288
  }
cli/src/email.php CHANGED
@@ -227,7 +227,7 @@ class Email extends BuddyPressCommand {
227
  * @param string $title Post title.
228
  * @return mixed
229
  */
230
- protected function _edit( $content, $title ) {
231
  $content = apply_filters( 'the_editor_content', $content );
232
  $output = \WP_CLI\Utils\launch_editor_for_input( $content, $title );
233
 
227
  * @param string $title Post title.
228
  * @return mixed
229
  */
230
+ protected function _edit( $content, $title ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
231
  $content = apply_filters( 'the_editor_content', $content );
232
  $output = \WP_CLI\Utils\launch_editor_for_input( $content, $title );
233
 
cli/src/group.php CHANGED
@@ -160,7 +160,7 @@ class Group extends BuddyPressCommand {
160
  if ( WP_CLI\Utils\get_flag_value( $assoc_args, 'porcelain' ) ) {
161
  WP_CLI::log( $group_id );
162
  } else {
163
- $group = groups_get_group( array(
164
  'group_id' => $group_id,
165
  ) );
166
  $permalink = bp_get_group_permalink( $group );
@@ -401,7 +401,7 @@ class Group extends BuddyPressCommand {
401
  );
402
 
403
  if ( isset( $assoc_args['user-id'] ) ) {
404
- $user = $this->get_user_id_from_identifier( $assoc_args['user-id'] );
405
  $query_args['user_id'] = $user->ID;
406
  }
407
 
160
  if ( WP_CLI\Utils\get_flag_value( $assoc_args, 'porcelain' ) ) {
161
  WP_CLI::log( $group_id );
162
  } else {
163
+ $group = groups_get_group( array(
164
  'group_id' => $group_id,
165
  ) );
166
  $permalink = bp_get_group_permalink( $group );
401
  );
402
 
403
  if ( isset( $assoc_args['user-id'] ) ) {
404
+ $user = $this->get_user_id_from_identifier( $assoc_args['user-id'] );
405
  $query_args['user_id'] = $user->ID;
406
  }
407
 
cli/src/scaffold.php CHANGED
@@ -145,6 +145,8 @@ class Scaffold extends Scaffold_Command {
145
 
146
  /**
147
  * Gets the template path based on installation type.
 
 
148
  */
149
  public static function get_template_path( $template ) {
150
  $command_root = WP_CLI\Utils\phar_safe_path( dirname( __DIR__ ) );
145
 
146
  /**
147
  * Gets the template path based on installation type.
148
+ *
149
+ * @return string Template path.
150
  */
151
  public static function get_template_path( $template ) {
152
  $command_root = WP_CLI\Utils\phar_safe_path( dirname( __DIR__ ) );
cli/src/xprofile-field.php CHANGED
@@ -199,9 +199,9 @@ class XProfile_Field extends BuddyPressCommand {
199
  WP_CLI::confirm( 'Are you sure you want to delete this field?', $assoc_args );
200
 
201
  parent::_delete( $args, $assoc_args, function( $field_id ) use ( $delete_data ) {
202
- $field = new \BP_XProfile_Field( $field_id );
203
- $name = $field->name;
204
- $id = $field->id;
205
 
206
  if ( $field->delete( $delete_data ) ) {
207
  return array( 'success', sprintf( 'Deleted XProfile field "%s" (ID %d).', $name, $id ) );
199
  WP_CLI::confirm( 'Are you sure you want to delete this field?', $assoc_args );
200
 
201
  parent::_delete( $args, $assoc_args, function( $field_id ) use ( $delete_data ) {
202
+ $field = new \BP_XProfile_Field( $field_id );
203
+ $name = $field->name;
204
+ $id = $field->id;
205
 
206
  if ( $field->delete( $delete_data ) ) {
207
  return array( 'success', sprintf( 'Deleted XProfile field "%s" (ID %d).', $name, $id ) );
cli/wp-cli-bp.php CHANGED
@@ -12,30 +12,40 @@ use WP_CLI;
12
  WP_CLI::add_hook(
13
  'before_wp_load',
14
  function() {
15
- require_once( __DIR__ . '/src/command.php' );
16
- require_once( __DIR__ . '/src/buddypress.php' );
17
- require_once( __DIR__ . '/src/signup.php' );
18
- require_once( __DIR__ . '/src/activity-fetcher.php' );
19
- require_once( __DIR__ . '/src/activity.php' );
20
- require_once( __DIR__ . '/src/activity-favorite.php' );
21
- require_once( __DIR__ . '/src/activity-meta.php' );
22
- require_once( __DIR__ . '/src/components.php' );
23
- require_once( __DIR__ . '/src/tool.php' );
24
- require_once( __DIR__ . '/src/notification.php' );
25
- require_once( __DIR__ . '/src/email.php' );
26
- require_once( __DIR__ . '/src/member.php' );
27
- require_once( __DIR__ . '/src/friends.php' );
28
- require_once( __DIR__ . '/src/messages.php' );
29
- require_once( __DIR__ . '/src/xprofile.php' );
30
- require_once( __DIR__ . '/src/xprofile-group.php' );
31
- require_once( __DIR__ . '/src/xprofile-field.php' );
32
- require_once( __DIR__ . '/src/xprofile-data.php' );
33
- require_once( __DIR__ . '/src/group-fetcher.php' );
34
- require_once( __DIR__ . '/src/group.php' );
35
- require_once( __DIR__ . '/src/group-member.php' );
36
- require_once( __DIR__ . '/src/group-invite.php' );
37
- require_once( __DIR__ . '/src/group-meta.php' );
38
- require_once( __DIR__ . '/src/scaffold.php' );
 
 
 
 
 
 
 
 
 
 
39
 
40
  WP_CLI::add_command(
41
  'bp',
@@ -156,11 +166,5 @@ WP_CLI::add_hook(
156
  __NAMESPACE__ . '\\Command\\XProfile_Data',
157
  array( 'before_invoke' => __NAMESPACE__ . '\\Command\\XProfile::check_dependencies' )
158
  );
159
-
160
- WP_CLI::add_command(
161
- 'bp scaffold',
162
- __NAMESPACE__ . '\\Command\\Scaffold',
163
- array( 'before_invoke' => __NAMESPACE__ . '\\Command\\Scaffold::check_dependencies' )
164
- );
165
  }
166
  );
12
  WP_CLI::add_hook(
13
  'before_wp_load',
14
  function() {
15
+ require_once __DIR__ . '/src/command.php';
16
+ require_once __DIR__ . '/src/buddypress.php';
17
+ require_once __DIR__ . '/src/signup.php';
18
+ require_once __DIR__ . '/src/activity-fetcher.php';
19
+ require_once __DIR__ . '/src/activity.php';
20
+ require_once __DIR__ . '/src/activity-favorite.php';
21
+ require_once __DIR__ . '/src/activity-meta.php';
22
+ require_once __DIR__ . '/src/components.php';
23
+ require_once __DIR__ . '/src/tool.php';
24
+ require_once __DIR__ . '/src/notification.php';
25
+ require_once __DIR__ . '/src/email.php';
26
+ require_once __DIR__ . '/src/member.php';
27
+ require_once __DIR__ . '/src/friends.php';
28
+ require_once __DIR__ . '/src/messages.php';
29
+ require_once __DIR__ . '/src/xprofile.php';
30
+ require_once __DIR__ . '/src/xprofile-group.php';
31
+ require_once __DIR__ . '/src/xprofile-field.php';
32
+ require_once __DIR__ . '/src/xprofile-data.php';
33
+ require_once __DIR__ . '/src/group-fetcher.php';
34
+ require_once __DIR__ . '/src/group.php';
35
+ require_once __DIR__ . '/src/group-member.php';
36
+ require_once __DIR__ . '/src/group-invite.php';
37
+ require_once __DIR__ . '/src/group-meta.php';
38
+
39
+ // Load only if the Scaffold package is present.
40
+ if ( class_exists( 'Scaffold_Command' ) ) {
41
+ require_once __DIR__ . '/src/scaffold.php';
42
+
43
+ WP_CLI::add_command(
44
+ 'bp scaffold',
45
+ __NAMESPACE__ . '\\Command\\Scaffold',
46
+ array( 'before_invoke' => __NAMESPACE__ . '\\Command\\Scaffold::check_dependencies' )
47
+ );
48
+ }
49
 
50
  WP_CLI::add_command(
51
  'bp',
166
  __NAMESPACE__ . '\\Command\\XProfile_Data',
167
  array( 'before_invoke' => __NAMESPACE__ . '\\Command\\XProfile::check_dependencies' )
168
  );
 
 
 
 
 
 
169
  }
170
  );
readme.txt CHANGED
@@ -6,7 +6,7 @@ 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,6 +125,9 @@ Try <a href="https://wordpress.org/plugins/bbpress/">bbPress</a>. It integrates
125
 
126
  == Upgrade Notice ==
127
 
 
 
 
128
  = 7.2.1 =
129
  See: https://codex.buddypress.org/releases/version-7-2-1/
130
 
@@ -184,6 +187,9 @@ See: https://codex.buddypress.org/releases/version-4-0-0/
184
 
185
  == Changelog ==
186
 
 
 
 
187
  = 7.2.1 =
188
  See: https://codex.buddypress.org/releases/version-7-2-1/
189
 
6
  Requires at least: 4.9
7
  Requires PHP: 5.6
8
  Tested up to: 5.7
9
+ Stable tag: 7.3.0
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.3.0 =
129
+ See: https://codex.buddypress.org/releases/version-7-3-0/
130
+
131
  = 7.2.1 =
132
  See: https://codex.buddypress.org/releases/version-7-2-1/
133
 
187
 
188
  == Changelog ==
189
 
190
+ = 7.3.0 =
191
+ See: https://codex.buddypress.org/releases/version-7-3-0/
192
+
193
  = 7.2.1 =
194
  See: https://codex.buddypress.org/releases/version-7-2-1/
195