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

225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
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

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.