bp_groups_add_admin_menu()
Register the Groups component in BuddyBoss > Groups admin screen.
Description
Source
File: bp-groups/bp-groups-admin.php
function bp_groups_add_admin_menu() {
if ( true === bp_disable_group_type_creation() ) {
// Add our screen.
$hooks[] = add_submenu_page(
'buddyboss-platform',
__( 'Groups', 'buddyboss' ),
__( 'Groups', 'buddyboss' ),
'bp_moderate',
'bp-groups',
'bp_groups_admin'
);
} else {
// Add our screen.
$hooks[] = add_submenu_page(
'buddyboss-platform',
__( 'Groups', 'buddyboss' ),
__( 'Groups', 'buddyboss' ),
'bp_moderate',
'bp-groups',
'bp_groups_admin'
);
}
foreach ( $hooks as $hook ) {
// Hook into early actions to load custom CSS and our init handler.
add_action( "load-$hook", 'bp_groups_admin_load' );
}
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 1.7.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.