Skip to:
Content

BuddyPress.org

Changeset 10885


Ignore:
Timestamp:
06/15/2016 11:33:22 PM (8 years ago)
Author:
dcavins
Message:

Groups: Add usage examples to bp_get_user_groups().

Add common usage examples to the long description of the new function
bp_get_user_groups().

See #6327.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-functions.php

    r10858 r10885  
    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 *
Note: See TracChangeset for help on using the changeset viewer.