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

buddypress-trac noreply at wordpress.org
Wed Jul 3 12:01:43 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                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+------------------------------

Comment (by espellcaste):

 A nice addition.

 Only two suggestions comes to mind:

 Add `@global wpdb $wpdb WordPress database object.` to the new
 `bp_members_filter_user_query_populate_extras_meta` function.

 And change the references from `add_filter` to `add_action` since you are
 modifying the user query but not returning anything. This "issue" is true
 to the examples you shared too.
 [https://github.com/buddypress/buddypress/blob/50c42d40fd8a23847abb070b350b00b124e398a9/src
 /bp-xprofile/bp-xprofile-filters.php#L536 See.]

 It's true that it works as is but it is ''semantically'' incorrect.

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


More information about the buddypress-trac mailing list