[buddypress-trac] [BuddyPress Trac] #6865: `bp_activity_get_actions()` should only sort when necessary

buddypress-trac noreply at wordpress.org
Tue Feb 2 03:50:35 UTC 2016


#6865: `bp_activity_get_actions()` should only sort when necessary
----------------------------------+-----------------------
 Reporter:  boonebgorges          |      Owner:
     Type:  enhancement           |     Status:  new
 Priority:  normal                |  Milestone:  2.5
Component:  Component - Activity  |    Version:
 Severity:  normal                |   Keywords:  has-patch
----------------------------------+-----------------------
 Sorting is an expensive operation (see #6864) so we should refrain from
 doing it when it's not needed. `bp_activity_get_actions()` sorts each
 component's actions each time the function is called.

 But this is generally not necessary. Sometimes post-type-specific actions
 are loaded dynamically when `bp_activity_get_actions()` is called. In
 these cases, the sort is necessary. Otherwise, the sort order will always
 remain the same.

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


More information about the buddypress-trac mailing list