[buddypress-trac] [BuddyPress] #4483: Allow ASC and DESC sort in bp_has_groups()

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Aug 29 03:05:36 UTC 2012

#4483: Allow ASC and DESC sort in bp_has_groups()
 Reporter:  boonebgorges  |      Owner:  boonebgorges
     Type:  defect (bug)  |     Status:  new
 Priority:  low           |  Milestone:  1.7
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:
 bp_has_groups() allows sorting by several different types: 'newest',
 'popular', 'active', etc. But these sort orders only go in one direction
 (generally, DESC). This is a pretty arbitrary limitation, and it causes
 problems with the sortable group list in the Groups Admin UI (#4414).

 My suggestion: Introduce 'order' and 'orderby' parameters to the
 bp_has_groups() stack (which has the added benefit of better matching the
 way that queries are handled elsewhere in BP/WP). Map 'type' parameters
 onto 'order' and 'orderby' inside of the function (eg, 'active' is
 equivalent to 'orderby' = 'last_activity' and 'order' = 'DESC'). Allow
 'order'/'orderby', when present, to override the 'type' parameter.

 Marking this low priority. I'm putting it in the 1.7 milestone, but I
 don't think it's crucial to the release, so it's puntable.

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

More information about the buddypress-trac mailing list