[buddypress-trac] [BuddyPress] #5106: Better sorting for new bp_group_has_members() query

buddypress-trac noreply at wordpress.org
Sun Jul 21 17:35:03 UTC 2013


#5106: Better sorting for new bp_group_has_members() query
-------------------------+-----------------------------
 Reporter:  aaclayton    |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Groups       |    Version:  1.8
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 Since 1.8, the new bp_group_has_members() query is working great, but I
 perceive a limitation of the new approach. Previously,
 bp_group_has_members() sorted group members based on their join date
 (‘last_modified’ in the bp_groups_members table). After the update, the
 query is sorting based on ‘user_id’ instead.

 It would be really great to include sorting arguments in
 bp_groups_has_members(). I think that this function could accept “type”
 and “sort” arguments, where “type” could take values of either ‘user_id’
 or ‘last_modified’, and “sort” would be either ‘ASC’ or ‘DESC’.

 From an organizational perspective, a group member’s join date is
 (typically) a more informative sorting variable, and depending on the use
 case, either ascending OR descending could make more sense. Giving
 BuddyPress users the ability to tweak their loop sorting in the function
 would be great.

 Hope this is feedback that could be implemented. Thank you!

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5106>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list