bp_groups_admin()

Select the appropriate Groups admin screen, and output it.

Description

Source

File: bp-groups/bp-groups-admin.php

function bp_groups_admin() {

	// Added navigation tab on top.
	if ( bp_core_get_groups_admin_tabs() ) { ?>
		<div class="wrap">
			<h2 class="nav-tab-wrapper"><?php bp_core_admin_groups_tabs( __( 'All Groups', 'buddyboss' ) ); ?></h2>
		</div>
		<?php
	}
	// Decide whether to load the index or edit screen.
	$doaction = bp_admin_list_table_current_bulk_action();

	// Display the single group edit screen.
	if ( 'edit' == $doaction && ! empty( $_GET['gid'] ) ) {
		bp_groups_admin_edit();

	// Create the group from admin
	} elseif ( 'edit' == $doaction && ! empty( $_GET['create'] ) ) {
		bp_groups_admin_create();

	// Display the group deletion confirmation screen.
	} elseif ( 'delete' == $doaction && ! empty( $_GET['gid'] ) ) {
		bp_groups_admin_delete();

	// Otherwise, display the groups index screen.
	} else {
		bp_groups_admin_index();
	}
}

Changelog

Changelog
Version Description
BuddyPress 1.7.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.