Skip to:
Content
Pages
Categories
Search
Top
Bottom

Displaying Custom Groups in Group Admin

  • Avatar of Dimensionmedia
    David Bisset
    Participant

    @dimensionmedia

    I’m looking for a way to filter out or give a custom list of groups to a WordPress admin on a multisite installation. I’ve been looking at the bp-groups-admin.php file and attempting to figure out how to hook into or filter the groups that get displayed.

    My attention hovers around the BP_Groups_List_Table class and prepare_items. While bp_has_groups() is being used, i’m not sure how i can change the list. I’ve done this before in our instances but perhaps the code here in the admin (or that i’m in the admin instead of the frontend) is throwing me off.

    Help me see if either i’m blanking out or if this is possible. My function/filter starts out:

    add_filter (‘bp_has_groups’, ‘l_admin_bp_has_groups’, 10, 3);
    function l_admin_bp_has_groups ( $has_template, $groups_template, $r ) {

    if ( is_admin() ) {

    // you’re in the WP backend, now get an array of group ID and these are the ones shown to the admin

    }

    }

You must be logged in to reply to this topic.