Skip to:
Content

BuddyPress.org

Ticket #6209: 6209-docs-updates.12.patch

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

Documentation changes for group invitation functions.

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

    diff --git src/bp-groups/bp-groups-functions.php src/bp-groups/bp-groups-functions.php
    index 283392b..dbee599 100644
    function groups_post_update( $args = '' ) { 
    981981/**
    982982 * Get IDs of users with outstanding invites to a given group from a specified user.
    983983 *
    984  * @param int $user_id ID of the inviting user.
    985  * @param int $group_id ID of the group.
    986  * @return array IDs of users who have been invited to the group by the
    987  *         user but have not yet accepted.
     984 * @param int $user_id ID of the invitee.
     985 * @param int $limit Optional. Max number of results to return.
     986 *        Default: false (no limit).
     987 * @param int $page Optional. Page offset of results to return.
     988 *        Default: false (no limit).
     989 * @param string|array $exclude Optional. Array or comma-separated list
     990 *        of group IDs to exclude from results.
     991 * @return array {
     992 *           @type array $groups Array of groups returned by paginated query.
     993 *           @type int $total Count of groups matching query.
     994 *         }
    988995 */
    989996function groups_get_invites_for_user( $user_id = 0, $limit = false, $page = false, $exclude = false ) {
    990997
    function groups_get_invites_for_group( $user_id, $group_id ) { 
    12581265 * @param int $group_id ID of potential group.
    12591266 * @param string $type Optional. Use 'sent' to check for sent invites, 'all' to
    12601267 *        check for all. Default: 'sent'.
    1261  * @return bool True if an invitation is found, otherwise false.
     1268 * @return int|null The ID of the invitation if found, otherwise null.
    12621269 */
    12631270function groups_check_user_has_invite( $user_id, $group_id, $type = 'sent' ) {
    12641271        return BP_Groups_Member::check_has_invite( $user_id, $group_id, $type );
    function groups_delete_membership_request( $membership_id, $user_id = 0, $group_ 
    15881595 *
    15891596 * @param int $user_id ID of the user.
    15901597 * @param int $group_id ID of the group.
    1591  * @return int|null ID of the membership if found, otherwise false.
     1598 * @return int number of rows matched, otherwise 0. (False if arguments are empty.)
    15921599 */
    15931600function groups_check_for_membership_request( $user_id, $group_id ) {
    15941601        return BP_Groups_Member::check_for_membership_request( $user_id, $group_id );