Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/21/2014 01:50:30 PM (10 years ago)
Author:
boonebgorges
Message:

Introduce support for a 'type' sorting parameter in BP_Group_Member_Query

The 'type' parameter supports any of the arguments ('newest', 'active', etc)
supported by the parent class BP_User_Query. In addition, it's possible to
sort by type 'last_joined' and 'first_joined'.

This changeset also introduces the 'type' parameter through the
bp_group_has_members() function stack.

See #921

Props imath, boonebgorges

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-template.php

    r7947 r7948  
    20202020            'group_role'          => false,
    20212021            'search_terms'        => false,
     2022            'type'                => 'last_joined',
    20222023        ) );
    20232024
     
    21232124 *           Default: 1.
    21242125 *     @type array $group_role Optional. Array of group roles to include.
     2126 *     @type string $type Optional. Sort order of results. 'last_joined',
     2127 *           'first_joined', or any of the $type params available in
     2128 *           {@link BP_User_Query}. Default: 'last_joined'.
    21252129 *     @type string $search_terms Optional. Search terms to match.
    21262130 * }
     
    21392143        'group_role'          => false,
    21402144        'search_terms'        => false,
     2145        'type'                => 'last_joined',
    21412146    ) );
    21422147
Note: See TracChangeset for help on using the changeset viewer.