bp_nouveau_group_members_widget_overrides( array $args = array() )

Filter the Members widgets to only keep members of the displayed group.


Parameters Parameters

$args

(array) (Optional) The Members Template arguments.

Default value: array()


Top ↑

Return Return

(array) The Members Template arguments.


Source Source

File: bp-templates/bp-nouveau/includes/groups/functions.php

function bp_nouveau_group_members_widget_overrides( $args = array() ) {
	$group_members = groups_get_group_members( array( 'exclude_admins_mods' => false ) );

	if ( empty( $group_members['members'] ) ) {
		return $args;
	}

	return array_merge( $args, array(
		'include' => wp_list_pluck( $group_members['members'], 'ID' ),
	) );
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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