bp_nouveau_the_group_meta( array $args = array() )

Outputs or returns the group meta(s).


Parameters Parameters

$args

(array) (Optional) An array of arguments.

  • 'keys'
    (array) The list of template meta keys.
  • 'delimeter'
    (string) The delimeter to use in case there is more than one key to output.
  • 'echo'
    (boolean) True to output the template meta value. False otherwise.

Default value: array()


Top ↑

Return Return

(string) HTML Output.


Source Source

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

function bp_nouveau_the_group_meta( $args = array() ) {
	$r = bp_parse_args( $args, array(
		'keys'      => array(),
		'delimeter' => '/',
		'echo'      => true,
	), 'nouveau_the_group_meta' );

	$group_meta = (array) bp_nouveau_get_group_meta( $r['keys'] );

	if ( ! $group_meta ) {
		return;
	}

	$meta = '';
	if ( 1 < count( $group_meta ) ) {
		$group_meta = array_filter( $group_meta );
		$meta       = join( ' ' . $r['delimeter'] . ' ', array_map( 'esc_html', $group_meta ) );
	} else {
		$meta = reset( $group_meta );
	}

	if ( ! $r['echo'] ) {
		return $meta;
	}

	echo $meta;
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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