bp_core_get_users_admin_tabs( string $active_tab = '' )
Register tabs for the BuddyBoss > Groups screens.
Description
Parameters
- $active_tab
-
(Optional)
Default value: ''
Return
(array)
Source
File: bp-xprofile/bp-xprofile-admin.php
function bp_core_get_users_admin_tabs( $active_tab = '') { $tabs = array(); // Check profile type enabled. $is_member_type_enabled = bp_member_type_enable_disable(); // Check profile search enabled. $is_profile_search_enabled = bp_disable_advanced_profile_search(); $tabs[] = array( 'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-profile-setup' ), 'admin.php' ) ), 'name' => __( 'Profile Fields', 'buddyboss' ), 'class' => 'bp-profile-fields', ); if ( true === $is_member_type_enabled ) { if ( is_network_admin() && bp_is_network_activated() ) { $profile_url = get_admin_url( bp_get_root_blog_id(), 'edit.php?post_type=bp-member-type' ); } else { $profile_url = bp_get_admin_url( add_query_arg( array( 'post_type' => 'bp-member-type' ), 'edit.php' ) ); } $tabs[] = array( 'href' => $profile_url, 'name' => __( 'Profile Types', 'buddyboss' ), 'class' => 'bp-profile-types', ); } if ( false === $is_profile_search_enabled ) { $tabs[] = array( 'href' => bp_get_admin_url( add_query_arg( array( 'post_type' => 'bp_ps_form' ), 'edit.php' ) ), 'name' => __( 'Profile Search', 'buddyboss' ), 'class' => 'bp-profile-search', ); } $query['autofocus[section]'] = 'bp_nouveau_user_primary_nav'; $section_link = add_query_arg( $query, admin_url( 'customize.php' ) ); $tabs[] = array( 'href' => esc_url( $section_link ), 'name' => __( 'Profile Navigation', 'buddyboss' ), 'class' => 'bp-user-customizer', ); /** * Filters the tab data used in our wp-admin screens. * * @since BuddyBoss 1.0.0 * * @param array $tabs Tab data. */ return apply_filters( 'bp_core_get_users_admin_tabs', $tabs ); }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.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.