bp_get_group_create_button()
Get the Create a Group button.
Description
Return
(false|string)
Source
File: bp-groups/bp-groups-template.php
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
| 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.