Skip to:
Content

BuddyPress.org

Ticket #6209: 6209-invite-docs.08.patch

File 6209-invite-docs.08.patch, 2.2 KB (added by dcavins, 5 years ago)

Documentation updates for groups_get_invites_for_user (), groups_check_user_has_invite() & groups_check_for_membership_request()

  • src/bp-groups/bp-groups-functions.php

    diff --git src/bp-groups/bp-groups-functions.php src/bp-groups/bp-groups-functions.php
    index 4886ff6..51e87b9 100644
    function groups_post_update( $args = '' ) { 
    856856/**
    857857 * Get IDs of users with outstanding invites to a given group from a specified user.
    858858 *
    859  * @param int $user_id ID of the inviting user.
    860  * @param int $group_id ID of the group.
    861  * @return array IDs of users who have been invited to the group by the
    862  *         user but have not yet accepted.
     859 * @param int $user_id ID of the invitee.
     860 * @param int $limit Optional. Max number of results to return.
     861 *        Default: false (no limit).
     862 * @param int $page Optional. Page offset of results to return.
     863 *        Default: false (no limit).
     864 * @param string|array $exclude Optional. Array or comma-separated list
     865 *        of group IDs to exclude from results.
     866 * @return array {
     867 *           @type array $groups Array of groups returned by paginated query.
     868 *           @type int $total Count of groups matching query.
     869 *         }
    863870 */
    864871function groups_get_invites_for_user( $user_id = 0, $limit = false, $page = false, $exclude = false ) {
    865872
    function groups_get_invites_for_group( $user_id, $group_id ) { 
    10861093 * @param int $group_id ID of potential group.
    10871094 * @param string $type Optional. Use 'sent' to check for sent invites, 'all' to
    10881095 *        check for all. Default: 'sent'.
    1089  * @return bool True if an invitation is found, otherwise false.
     1096 * @return int|null The ID of the invitation if found, otherwise null.
    10901097 */
    10911098function groups_check_user_has_invite( $user_id, $group_id, $type = 'sent' ) {
    10921099        return BP_Groups_Member::check_has_invite( $user_id, $group_id, $type );
    function groups_delete_membership_request( $membership_id, $user_id = 0, $group_ 
    13401347 *
    13411348 * @param int $user_id ID of the user.
    13421349 * @param int $group_id ID of the group.
    1343  * @return int|null ID of the membership if found, otherwise false.
     1350 * @return int number of rows matched, otherwise 0. (False if arguments are empty.)
    13441351 */
    13451352function groups_check_for_membership_request( $user_id, $group_id ) {
    13461353        return BP_Groups_Member::check_for_membership_request( $user_id, $group_id );