bp_member_type_show_data( $column,  $post_id )

Display data by column and post id.

Description

Parameters

$column

(Required)

$post_id

(Required)

Source

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

function bp_member_type_show_data( $column, $post_id  ) {

	switch( $column ) {

		case 'member_type':

			echo '<code>'. get_post_meta( $post_id, '_bp_member_type_label_singular_name', true ).'</code>';
			break;

		case 'enable_filter':

			if( get_post_meta( $post_id, '_bp_member_type_enable_filter', true ) )
				_e( 'Show', 'buddyboss' );
			else
				_e( 'Hide', 'buddyboss' );

			break;

		case 'enable_remove':

			if( get_post_meta( $post_id, '_bp_member_type_enable_remove', true ) )
				_e( 'Hide', 'buddyboss' );
			else
				_e( 'Show', 'buddyboss' );

			break;

		case 'total_users':

			$name = bp_get_member_type_key( $post_id );
			$type_id = bp_member_type_term_taxonomy_id($name);

			$member_type_url = admin_url().'users.php?bp-member-type='.$name;
			$count = count( bp_member_type_by_type( $type_id ) );

			if ( $count > 0 )
			//@todo why text domain here and below?
				printf( '<a href="%s">%s</a>', esc_url( $member_type_url ), $count );
			else
				echo '0';

			break;

	}

}

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.