Skip to:
Content

BuddyPress.org

Ticket #6327: 6327.description.diff

File 6327.description.diff, 1014 bytes (added by dcavins, 8 years ago)

Adds usage examples to long description.

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

    diff --git src/bp-groups/bp-groups-functions.php src/bp-groups/bp-groups-functions.php
    index 618e048..cb0753e 100644
    function groups_get_user_groups( $user_id = 0, $pag_num = 0, $pag_page = 0 ) { 
    793793/**
    794794 * Get a list of groups of which the specified user is a member.
    795795 *
     796 * Get a list of the groups to which this member belongs,
     797 * filtered by group membership status and role.
     798 * Usage examples: Used with no arguments specified,
     799 *
     800 *    bp_get_user_groups( bp_loggedin_user_id() );
     801 *
     802 * returns an array of the groups in which the logged-in user
     803 * is an unpromoted member. To fetch an array of all groups that
     804 * the current user belongs to, in any membership role,
     805 * member, moderator or administrator, use
     806 *
     807 *    bp_get_user_groups( $user_id, array(
     808 *        'is_admin' => null,
     809 *        'is_mod' => null,
     810 *    ) );
     811 *
    796812 * @since 2.6.0
    797813 *
    798814 * @param int $user_id ID of the user.