bp_core_get_admin_tabs( string $active_tab = '' )

Get the data for the tabs in the admin area.

Description

Parameters

$active_tab

(Optional) Name of the tab that is active. Optional.

Default value: ''

Return

(string)

Source

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

function bp_core_get_admin_tabs( $active_tab = '' ) {

	$tabs = array(
		'0' => array(
			'href'  => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-components' ), 'admin.php' ) ),
			'name'  => __( 'Components', 'buddyboss' ),
			'class' => 'bp-components',
		),
		'1' => array(
			'href'  => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-pages' ), 'admin.php' ) ),
			'name'  => __( 'Pages', 'buddyboss' ),
			'class' => 'bp-pages',
		),
		'2' => array(
			'href'  => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-settings' ), 'admin.php' ) ),
			'name'  => __( 'Settings', 'buddyboss' ),
			'class' => 'bp-settings',
		),
		'3' => array(
			'href'  => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-integrations' ), 'admin.php' ) ),
			'name'  => __( 'Integrations', 'buddyboss' ),
			'class' => 'bp-integrations',
		),
		'4' => array(
			'href'  => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-tools' ), 'admin.php' ) ),
			'name'  => __( 'Tools', 'buddyboss' ),
			'class' => 'bp-tools',
		),
		'5' => array(
			'href'  => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-help' ), 'admin.php' ) ),
			'name'  => __( 'Help', 'buddyboss' ),
			'class' => 'bp-help',
		),
		'6' => array(
			'href'  => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-credits' ), 'admin.php' ) ),
			'name'  => __( 'Credits', 'buddyboss' ),
			'class' => 'bp-credits',
		),

	);

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

Changelog

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