Changeset 12741
- Timestamp:
- 10/08/2020 02:31:49 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-functions.php
r12731 r12741 1416 1416 'page' => $page, 1417 1417 ); 1418 $groups = groups_get_groups( $args ); 1419 1420 return array( 'groups' => $groups['groups'], 'total' => groups_get_invite_count_for_user( $user_id ) ); 1418 1419 return groups_get_groups( $args ); 1421 1420 } 1422 1421 … … 1434 1433 } 1435 1434 1436 return count( groups_get_invited_to_group_ids( $user_id ) ); 1435 $invites = groups_get_invites_for_user( $user_id ); 1436 return $invites['total']; 1437 1437 } 1438 1438 -
trunk/tests/phpunit/testcases/groups/class-bp-groups-member.php
r12431 r12741 888 888 889 889 $this->assertEqualSets( array( $g1, $g2, $g3 ), wp_list_pluck( $groups['groups'], 'id' ) ); 890 $this->assertEquals( 3, $groups['total'] ); 890 891 } 891 892 … … 963 964 $groups = groups_get_invites_for_user( $u2, false, false, array( $g2 ) ); 964 965 $this->assertEqualSets( array( $g1, $g3 ), wp_list_pluck( $groups['groups'], 'id' ) ); 966 $this->assertEquals( 2, $groups['total'] ); 965 967 } 966 968
Note: See TracChangeset
for help on using the changeset viewer.