bp_group_admin_tabs_backcompat( string $subnav_output = '', string $subnav_item = '', string $selected_item = '' )

BackCompat for plugins/themes directly hooking groups_admin_tabs without using the Groups Extension API.

Description

Parameters

$subnav_output

(Optional) Subnav item output.

Default value: ''

$subnav_item

(Optional) subnav item params.

Default value: ''

$selected_item

(Optional) Surrent selected tab.

Default value: ''

Return

(string) HTML output

Source

File: bp-groups/bp-groups-template.php

3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
function bp_group_admin_tabs_backcompat( $subnav_output = '', $subnav_item = '', $selected_item = '' ) {
    if ( ! has_action( 'groups_admin_tabs' ) ) {
        return $subnav_output;
    }
 
    $group = groups_get_current_group();
 
    ob_start();
 
    do_action( 'groups_admin_tabs', $selected_item, $group->slug );
 
    $admin_tabs_backcompat = trim( ob_get_contents() );
    ob_end_clean();
 
    if ( ! empty( $admin_tabs_backcompat ) ) {
        _doing_it_wrong( "do_action( 'groups_admin_tabs' )", __( 'This action should not be used directly. Please use the BuddyPress Group Extension API to generate Manage tabs.', 'buddyboss' ), '2.2.0' );
        $subnav_output .= $admin_tabs_backcompat;
    }
 
    return $subnav_output;
}

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.