bp_groups_get_group_type_object( string $group_type )

Retrieve a group type object by name.

Parameters Parameters


(string) (Required) The name of the group type.

Top ↑

Return Return

(object) A group type object.

Source 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 ];

Top ↑

Changelog Changelog

Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.