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.


Parameters Parameters

$subnav_output

(string) (Optional) Subnav item output.

Default value: ''

$subnav_item

(string) (Optional) subnav item params.

Default value: ''

$selected_item

(string) (Optional) Surrent selected tab.

Default value: ''


Top ↑

Return Return

(string) HTML output


Source Source

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

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.', 'buddypress' ), '2.2.0' );
		$subnav_output .= $admin_tabs_backcompat;
	}

	return $subnav_output;
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.