bp_member_type_term_taxonomy_id( $member_type_name )

Gets profile type term taxonomy id.

Description

Parameters

$type_name

(Required)

Return

(int)

Source

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

function bp_member_type_term_taxonomy_id( $type_name ) {
	global $wpdb;
	$type_name = strtolower($type_name);
	$type_name = str_replace(array(' ', ','), array('-', '-'), $type_name);

	$type_id = $wpdb->get_col( "SELECT tt.term_taxonomy_id FROM {$wpdb->prefix}term_taxonomy tt INNER JOIN {$wpdb->prefix}terms t ON t.term_id = tt.term_id WHERE t.slug = '" . $type_name . "' AND  tt.taxonomy = 'bp_member_type' " );
	return ! isset( $type_id[ 0 ] ) ? '' : $type_id[ 0 ];
}

Changelog

Changelog
Version Description
BuddyBoss 1.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.