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
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
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.