Sticky Groups missing when using BP_Groups_Group::get function
-
Hello,
I noticed with a custom plugin I’d built that my call to get all groups including hidden groups using BP_Groups_Group::get function that the sticky groups were filtered out but not added back in.
My Code to get Groups;
$bp_groups = BP_Groups_Group::get( array( 'type' => 'alphabetical', 'show_hidden' => true ) );
Looking into the code of this plugin it appears the sticky groups are filtered using the bp_groups_get_paged_groups_sql filter and then added back in using the groups_get_groups filter. This filter is applied through the groups_get_groups function which is an alias of BP_Groups_Group::get
So in my case I can switch the function I utilize so that the groups_get_groups filter is executed to add back the sticky groups.
Is it possible to amend this plugin to support the BP_Groups_Group::get approach? I’ve seen it used in several themes and plugins.
Thank you
- The topic ‘Sticky Groups missing when using BP_Groups_Group::get function’ is closed to new replies.