bp_nouveau_group_members_widget_overrides( array $args = array() )

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

Description

Parameters

$args

(Optional) The Members Template arguments.

Default value: array()

Return

(array) The Members Template arguments.

Source

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

1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
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' ),
    ) );
}

Changelog

Changelog
Version Description
BuddyPress 3.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.