bp_get_member_type_object( string $member_type )

Retrieve a profile type object by name.

Description

Parameters

$member_type

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

Return

(object) A profile type object.

Source

File: bp-members/bp-members-functions.php

function bp_get_member_type_object( $member_type ) {
	$types = bp_get_member_types( array(), 'objects' );

	if ( empty( $types[ $member_type ] ) ) {
		return null;
	}

	return $types[ $member_type ];
}

Changelog

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