bp_core_get_admin_tabs( string $active_tab = '', string $context = 'settings' )
Get the data for the tabs in the admin area.
Description Description
Parameters Parameters
- $active_tab
-
(Optional) Name of the tab that is active. Optional.
Default value: ''
- $context
-
(Optional) The context of use for the tabs. Defaults to 'settings'. Possible values are 'settings' & 'tools'.
Default value: 'settings'
Return Return
(string)
Source 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', 'buddypress' ) ), '2' => array( 'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-settings' ), 'admin.php' ) ), 'name' => __( 'Options', 'buddypress' ) ), '1' => array( 'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-page-settings' ), 'admin.php' ) ), 'name' => __( 'Pages', 'buddypress' ) ), '3' => array( 'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-credits' ), 'admin.php' ) ), 'name' => __( 'Credits', 'buddypress' ) ), ); /** * Filters the tab data used in our wp-admin screens. * * @since 2.2.0 * * @param array $tabs Tab data. */ return apply_filters( 'bp_core_get_admin_tabs', $tabs ); }
Changelog Changelog
Version | Description |
---|---|
8.0.0 | Adds the $context parameter. |
2.2.0 | Introduced. |