bp_core_get_admin_integrations_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

797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
function bp_core_get_admin_integrations_tabs( $active_tab = '' ) {
    global $bp_admin_integration_tabs;
 
    if ( ! $bp_admin_integration_tabs ) {
        $bp_admin_integration_tabs = [];
    }
 
    uasort($bp_admin_integration_tabs, function($a, $b) {
        return $a->tab_order - $b->tab_order;
    });
 
    $tabs = array_filter($bp_admin_integration_tabs, function($tab) {
        return $tab->is_tab_visible();
    });
 
    $tabs = array_map(function($tab) {
        return [
            'href' => bp_core_admin_integrations_url($tab->tab_name),
            'name' => $tab->tab_label,
            'slug' => $tab->tab_name
        ];
    }, $tabs);
 
    /**
     * 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.