Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/21/2019 06:45:26 PM (6 years ago)
Author:
imath
Message:

Introduce a new User Interface to manage Group members

Welcome to the first Core feature to use the BP REST API, although this API is not yet included in BuddyPress! For now this feature is completely silent but as soon as the BP REST API has landed into BuddyPress, you will be able to enjoy a Group member management greatly improved.

  1. Whether you prefer to manage Group members from the single Group Administration screen into the WordPress back-end or from the Group Manage screen on the front-end, you will now experience a unique interface to promote, demote, remove or ban the Group members.
  2. Very popular Group Administrators will love the new search feature to save some time to find a particular member out of their crowded Group!

On a side note, this commit also introduces the bp-api-request.js JavaScript to ease exchanges with the BP REST API.

Props espellcaste

Fixes #8045

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-admin.php

    r12401 r12405  
    892892 */
    893893function bp_groups_admin_edit_metabox_members( $item ) {
     894    // Use the BP REST API if it supported.
     895    if ( bp_rest_api_is_available() && bp_groups_has_manage_group_members_templates() ) {
     896        wp_enqueue_script( 'bp-group-manage-members' );
     897        wp_localize_script(
     898            'bp-group-manage-members',
     899            'bpGroupManageMembersSettings',
     900            bp_groups_get_group_manage_members_script_data( $item->id )
     901        );
     902
     903        bp_get_template_part( 'common/js-templates/group-members/index' );
     904
     905        /**
     906         * Echo out the JavaScript variable.
     907         * This seems to be required by the autocompleter, leaving this here for now...
     908         */
     909        echo '<script type="text/javascript">var group_id = "' . esc_js( $item->id ) . '";</script>';
     910        return;
     911    }
    894912
    895913    // Pull up a list of group members, so we can separate out the types
Note: See TracChangeset for help on using the changeset viewer.