bp_nouveau_group_has_meta( string $meta_key = '' )

Does the group has metas or a specific meta value.


Parameters Parameters

$meta_key

(string) (Optional) The key of the meta to check the value for.

Default value: ''


Top ↑

Return Return

(bool) True if the group has meta. False otherwise.


Source Source

File: bp-templates/bp-nouveau/includes/groups/template-tags.php

function bp_nouveau_group_has_meta( $meta_key = '' ) {
	if ( ! $meta_key ) {
		$meta_keys = array( 'status', 'count' );
	} else {
		$meta_keys = array( $meta_key );
	}

	$group_meta = bp_nouveau_get_group_meta( $meta_keys );
	$group_meta = array_filter( $group_meta );

	return ! empty( $group_meta );
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.2.0 Adds the $meta_key argument.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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