BP_Groups_List_Table::column_content_group_type( string $retval = '', string $column_name = '', array $item = array() )

Markup for the Group Type column.


Parameters Parameters

$retval

(string) (Optional) Empty string.

Default value: ''

$column_name

(string) (Optional) Name of the column being rendered.

Default value: ''

$item

(array) (Optional) The current group item in the loop.

Default value: array()


Top ↑

Return Return

(string)


Source Source

File: bp-groups/classes/class-bp-groups-list-table.php

	public function column_content_group_type( $retval = '', $column_name = '', $item = array() ) {
		if ( 'bp_group_type' !== $column_name ) {
			return $retval;
		}

		add_filter( 'bp_get_group_type_directory_permalink', array( $this, 'group_type_permalink_use_admin_filter' ), 10, 2 );
		$retval = bp_get_group_type_list( $item['id'], array(
			'parent_element' => '',
			'label_element'  => '',
			'label'          => '',
			'show_all'       => true
		) );
		remove_filter( 'bp_get_group_type_directory_permalink', array( $this, 'group_type_permalink_use_admin_filter' ), 10 );

		/**
		 * Filters the markup for the Group Type column.
		 *
		 * @since 2.7.0
		 *
		 * @param string $retval Markup for the Group Type column.
		 * @parma array  $item   The current group item in the loop.
		 */
		echo apply_filters_ref_array( 'bp_groups_admin_get_group_type_column', array( $retval, $item ) );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.