bp_get_group_member_ban_link( int $user_id, object|bool $group = false )

Generate a URL for banning a member from a group.

Description

Parameters

$user_id

(Required) ID of the member to ban. Default: current member in a member loop.

$group

(Optional) Group object. Default: current group.

Default value: false

Return

(string)

Source

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

3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
function bp_get_group_member_ban_link( $user_id = 0, $group = false ) {
    global $groups_template;
 
    if ( empty( $group ) ) {
        $group =& $groups_template->group;
    }
 
    /**
     * Filters a URL for banning a member from a group.
     *
     * @since BuddyPress 1.0.0
     *
     * @param string $value URL to use for banning a member.
     */
    return apply_filters( 'bp_get_group_member_ban_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'admin/manage-members/ban/' . $user_id ), 'groups_ban_member' ) );
}

Changelog

Changelog
Version Description
BuddyPress 1.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.