[buddypress-trac] [BuddyPress Trac] #5508: Filter for sorting

buddypress-trac noreply at wordpress.org
Wed Apr 2 17:02:52 UTC 2014

#5508: Filter for sorting
 Reporter:  mpa4hu       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Core         |    Version:  2.0
 Severity:  normal       |   Keywords:
 @boonebgorges Hello again,

 Ill try to make a story out of this >.<
 This continiues ticket https://buddypress.trac.wordpress.org/ticket/5480
 created by me.

 You were right this could make a good plugin, but since I'm not
 experienced in developing and totally newbie to wordpress itself, I'm just
 messing around scripts. Now I decided to build my first plugin out of

 Plugin would add two new scopes (optionally) to the main stream.
 First one is "Hot algorithm" which sorts activity by "favorite count" and
 And second (since first one just makes plugin too small) is "Recent". when
 new comment is made to the activity, I'll save new meta "bp_last_timestap"
 with comments date and sort by that date. So this will look more like

 Then I thought what you sad and you are right, its really not smart to
 hook there and change whole query. I experimented with
 `bp_has_activities()` hooks and its just more simple to pass meta directly
 there (I was confused since documentation shows only how to pass strings)


 If you could add a simple filter here (well at least I don't need anything
 passed there)

 // Sorting
 if ( $sort != 'ASC' && $sort != 'DESC' )
         $sort = 'DESC';

 It will save me many troubles.
 Please if you can make this for 2.0 I could support my plugin from this
 major version.

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

More information about the buddypress-trac mailing list