bp_nouveau_object_template_results_groups_tabs( $results,  $object )

Object template results groups tabs.

Description

Source

File: bp-templates/bp-nouveau/includes/ajax.php

function bp_nouveau_object_template_results_groups_tabs( $results, $object ) {
	if ( $object != 'groups' ) {
		return $results;
	}

	$results['scopes'] = [];

	add_filter( 'bp_ajax_querystring', 'bp_nouveau_object_template_results_groups_all_scope', 20 );
	bp_has_groups( bp_ajax_querystring( 'groups' ) );
	$results['scopes']['all'] = $GLOBALS["groups_template"]->total_group_count;
	remove_filter( 'bp_ajax_querystring', 'bp_nouveau_object_template_results_groups_all_scope', 20 );

	add_filter( 'bp_ajax_querystring', 'bp_nouveau_object_template_results_groups_personal_scope', 20 );
	bp_has_groups( bp_ajax_querystring( 'groups' ) );
	$results['scopes']['personal'] = $GLOBALS["groups_template"]->total_group_count;
	remove_filter( 'bp_ajax_querystring', 'bp_nouveau_object_template_results_groups_personal_scope', 20 );

	return $results;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.