Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/04/2013 03:04:29 AM (11 years ago)
Author:
boonebgorges
Message:

Deprecate exclude_banned arg of bp_group_has_members() in favor of 'banned' role

This changeset introduces support for the 'banned' group_role filter in
BP_Group_Member_Query. This takes the place of the exclude_banned parameter.
Backward compatibility for exclude_banned is added in
groups_get_group_members().

See #4977

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-functions.php

    r7141 r7145  
    405405    } else {
    406406
    407         // exclude_admins_mods is a legacy argument. Convert to group_role
     407        // exclude_admins_mods and exclude_banned are legacy arguments.
     408        // Convert to group_role
    408409        if ( empty( $group_role ) ) {
    409             $group_role = $exclude_admins_mods ? array( 'member' ) : array( 'member', 'mod', 'admin' );
     410            $group_role = array( 'member' );
     411
     412            if ( ! $exclude_admins_mods ) {
     413                $group_role[] = 'mod';
     414                $group_role[] = 'admin';
     415            }
     416
     417            if ( ! $exclude_banned ) {
     418                $group_role[] = 'banned';
     419            }
    410420        }
    411421
     
    416426            'page'           => $page,
    417427            'group_role'     => $group_role,
    418             'exclude_banned' => $exclude_banned,
    419428            'exclude'        => $exclude,
    420429            'type'           => 'last_modified',
Note: See TracChangeset for help on using the changeset viewer.