bp_core_get_forums_admin_tabs( string $active_tab = '' )
Register tabs for the BuddyBoss > Forums screens.
Description
Parameters
- $active_tab
-
(Optional)
Default value: ''
Return
(array)
Source
File: bp-forums/admin.php
function bp_core_get_forums_admin_tabs( $active_tab = '') {
$tabs = array();
$tabs[] = array(
'href' => bp_get_admin_url( add_query_arg( array( 'post_type' => bbp_get_forum_post_type() ), 'edit.php' ) ),
'name' => __( 'Forums', 'buddyboss' ),
'class' => 'bp-forums',
);
$tabs[] = array(
'href' => bp_get_admin_url( add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), 'edit.php' ) ),
'name' => __( 'Discussions', 'buddyboss' ),
'class' => 'bp-discussions',
);
$tabs[] = array(
'href' => bp_get_admin_url( add_query_arg( array( 'taxonomy' => bbp_get_topic_tag_tax_id(), 'post_type' => bbp_get_topic_post_type() ), 'edit-tags.php' ) ),
'name' => __( 'Discussion Tags', 'buddyboss' ),
'class' => 'bp-tags',
);
$tabs[] = array(
'href' => bp_get_admin_url( add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), 'edit.php' ) ),
'name' => __( 'Replies', 'buddyboss' ),
'class' => 'bp-replies',
);
/**
* 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_forums_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.