Skip to:
Content

BuddyPress.org

Opened 3 years ago

Closed 3 years ago

#7327 closed enhancement (fixed)

Add bp_parse_args filter to groups_get_groups

Reported by: rekmla Owned by: djpaul
Milestone: 2.8 Priority: low
Severity: minor Version:
Component: Groups Keywords: good-first-bug needs-patch
Cc:

Description

This would make it possible to avoid plugin modifications (bp-event-organiser for example) when group filtering is required. This can currently be accomplished before the query results are returned with apply_filters_ref_array( 'groups_get_groups', array( &$groups, &$r ) ). Something more efficient would be desirable.

Change History (2)

#1 @slaFFik
3 years ago

  • Keywords good-first-bug needs-patch added
  • Milestone changed from Awaiting Review to 2.8

Thanks for suggestion, @rekmla!

bp_parse_args() in that function (imo not in BP_Groups_Group::get()) should be used there instead of wp_parse_args() with 'get_group' filter key, I suppose.

Related and fixed: #7250

Last edited 3 years ago by slaFFik (previous) (diff)

#2 @djpaul
3 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 11286:

Groups: use bp_parse_args in groups_get_groups.

This gives us a new filter that can be used to modify query arguments
before passing it to BP_Groups_Group::get.

Fixes #7327

Props slaFFik, rekmla

Note: See TracTickets for help on using tickets.