bp_nouveau_group_setup_nav()

Setup group invite navigation menu item.

Description

Source

File: bp-templates/bp-nouveau/includes/groups/functions.php

357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
function bp_nouveau_group_setup_nav() {
    if ( ! bp_is_group() || ! bp_groups_user_can_send_invites() ) {
        return;
    }
 
    // Simply change the name
    if ( bp_is_active( 'friends' ) ) {
        $bp = buddypress();
 
        $bp->groups->nav->edit_nav(
            array( 'name' => __( 'Send Invites', 'buddyboss' ) ),
            'send-invites',
            bp_get_current_group_slug()
        );
 
    // Create the Subnav item for the group
    } else {
        $current_group = groups_get_current_group();
        $group_link    = bp_get_group_permalink( $current_group );
 
        bp_core_new_subnav_item( array(
            'name'            => __( 'Send Invites', 'buddyboss' ),
            'slug'            => 'send-invites',
            'parent_url'      => $group_link,
            'parent_slug'     => $current_group->slug,
            'screen_function' => 'groups_screen_group_invite',
            'item_css_id'     => 'invite',
            'position'        => 70,
            'user_has_access' => $current_group->user_has_access,
            'no_access_url'   => $group_link,
        ) );
    }
}

Changelog

Changelog
Version Description
BuddyPress 3.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.