groups_get_groupmeta( int $group_id, string $meta_key = '', bool $single = true )

Get a piece of group metadata.


Parameters Parameters

$group_id

(int) (Required) ID of the group.

$meta_key

(string) (Optional) Metadata key.

Default value: ''

$single

(bool) (Optional) If true, return only the first value of the specified meta_key. This parameter has no effect if meta_key is empty.

Default value: true


Top ↑

Return Return

(mixed) Metadata value.


Source Source

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

function groups_get_groupmeta( $group_id, $meta_key = '', $single = true ) {
	add_filter( 'query', 'bp_filter_metaid_column_name' );
	$retval = get_metadata( 'group', $group_id, $meta_key, $single );
	remove_filter( 'query', 'bp_filter_metaid_column_name' );

	return $retval;
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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