bp_group_type_show_data( $column,  $post_id )

Display data by column and post id.

Description

Parameters

$column

(Required)

$post_id

(Required)

Source

File: bp-groups/bp-groups-admin.php

function bp_group_type_show_data( $column, $post_id  ) {

	switch( $column ) {

		case 'group_type':

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

		case 'enable_filter':

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

			break;

		case 'enable_remove':

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

			break;

		case 'total_groups':

			$group_key = bp_get_group_type_key( $post_id );
			$group_type_url = admin_url().'admin.php?page=bp-groups&bp-group-type='.$group_key;
			printf(
				__( '<a href="%s">%s</a>', 'buddyboss' ),
				esc_url( $group_type_url ), bp_get_total_count_by_group_types( $group_key )
			);

			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.