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