[buddypress-trac] [BuddyPress Trac] #9205: Move some BP_User_Query::populate_extras() properties to hooks

buddypress-trac noreply at wordpress.org
Wed Jul 3 07:37:45 UTC 2024


#9205: Move some BP_User_Query::populate_extras() properties to hooks
-------------------------+------------------------------------
 Reporter:  r-a-y        |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Core         |    Version:  1.7
 Severity:  normal       |   Keywords:  dev-feedback has-patch
-------------------------+------------------------------------
 In `BP_User_Query::populate_extras()`, we hook the XProfile component and
 Friends component to add in extra data to the user query results. See
 `bp_xprofile_filter_user_query_populate_extras()` and
 `bp_friends_filter_user_query_populate_extras()`.

 However, we hardcode the last activity timestamp, total friend count, last
 activity update and meta_key/meta_value (if passed) to the user query
 results. What if we do not want to query and return these items to the
 user results?

 This patch moves the hardcoded items to hooks, so it is possible for
 developers to remove some of these fetched properties from the BP user
 query.

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


More information about the buddypress-trac mailing list