bp_get_group_create_button()

Get the Create a Group button.

Description

Return

(false|string)

Source

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

4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
function bp_get_group_create_button() {
    if ( ! is_user_logged_in() ) {
        return false;
    }
 
    if ( ! bp_user_can_create_groups() ) {
        return false;
    }
 
    $button_args = array(
        'id'         => 'create_group',
        'component'  => 'groups',
        'link_text'  => __( 'Create a Group', 'buddyboss' ),
        'link_class' => 'group-create no-ajax',
        'link_href'  => trailingslashit( bp_get_groups_directory_permalink() . 'create' ),
        'wrapper'    => false,
        'block_self' => false,
    );
 
    /**
     * Filters the HTML button for creating a group.
     *
     * @since BuddyPress 2.0.0
     *
     * @param string $button HTML button for creating a group.
     */
    return bp_get_button( apply_filters( 'bp_get_group_create_button', $button_args ) );
}

Changelog

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