bp_core_get_groups_admin_tabs( string $active_tab = '' )

Register tabs for the BuddyBoss > Groups screens.

Description

Parameters

$active_tab

(Optional)

Default value: ''

Return

(array)

Source

File: bp-core/admin/bp-core-admin-functions.php

function bp_core_get_groups_admin_tabs( $active_tab = '') {

	$tabs = array();

	$tabs[] = array(
		'href'  => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-groups' ), 'admin.php' ) ),
		'name'  => __( 'All Groups', 'buddyboss' ),
		'class' => 'bp-all-groups',
	);

	if ( true === bp_disable_group_type_creation() ) {

		if ( is_network_admin() && bp_is_network_activated() ) {
			$group_url = get_admin_url( bp_get_root_blog_id(), 'edit.php?post_type=bp-group-type' );
		} else {
			$group_url = bp_get_admin_url( add_query_arg( array( 'post_type' => 'bp-group-type' ), 'edit.php' ) );
		}

		$tabs[] = array(
			'href'  => $group_url,
			'name'  => __( 'Group Types', 'buddyboss' ),
			'class' => 'bp-group-types',
		);

	}

	$query['autofocus[section]'] = 'bp_nouveau_group_primary_nav';
	$section_link = add_query_arg( $query, admin_url( 'customize.php' ) );
	$tabs[] = array(
		'href'  => esc_url( $section_link ),
		'name'  => __( 'Group Navigation', 'buddyboss' ),
		'class' => 'bp-group-customizer',
	);

	/**
	 * Filters the tab data used in our wp-admin screens.
	 *
	 * @since BuddyBoss 1.0.0
	 *
	 * @param array $tabs Tab data.
	 */
	return apply_filters( 'bp_core_get_groups_admin_tabs', $tabs );
}

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.