bp_get_removed_member_types()

Removed profile type.

Description

Return

(array)

Source

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

function bp_get_removed_member_types(){
	$bp_member_type_ids = array();
	$post_type = bp_get_member_type_post_type();
	$bp_member_type_args = array(
		'post_type' => $post_type,
		'meta_query' => array(
			array(
				'key'     => '_bp_member_type_enable_remove',
				'value'   => 1,
				'compare' => '=',
			),
		),
		'nopaging' => true,
	);

	$bp_member_type_query = new WP_Query($bp_member_type_args);
	if ($bp_member_type_query->have_posts()):
		while ($bp_member_type_query->have_posts()):
			$bp_member_type_query->the_post();

			$post_id = get_the_ID();
			$name = bp_get_member_type_key( $post_id );
			$bp_member_type_ids[] = array(
				'ID' => $post_id,
				'name' => $name,
			);
		endwhile;
	endif;
	wp_reset_query();
	wp_reset_postdata();
	return $bp_member_type_ids;
}

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.