bp_groups_get_group_type_object( string $group_type )
Retrieve a group type object by name.
Description
Parameters
- $group_type
-
(Required) The name of the group type.
Return
(object) A group type object.
Source
File: bp-groups/bp-groups-functions.php
function bp_groups_get_group_type_object( $group_type ) { $types = bp_groups_get_group_types( array(), 'objects' ); if ( empty( $types[ $group_type ] ) ) { return null; } return $types[ $group_type ]; }
Changelog
Version | Description |
---|---|
BuddyPress 2.6.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.