This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

BP_Members_Admin::setup_actions()

Set admin-related actions and filters.

Description

Source

File: bp-members/classes/class-bp-members-admin.php

156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
private function setup_actions() {
 
    /** Extended Profile *************************************************
     */
 
    // Enqueue all admin JS and CSS.
    add_action( 'bp_admin_enqueue_scripts', array( $this, 'enqueue_scripts'   )        );
 
    // Add some page specific output to the <head>.
    add_action( 'bp_admin_head',            array( $this, 'admin_head'        ), 999   );
 
    // Add menu item to all users menu.
    add_action( 'admin_menu',               array( $this, 'admin_menus'       ), 5     );
    add_action( 'network_admin_menu',       array( $this, 'admin_menus'       ), 5     );
    add_action( 'user_admin_menu',          array( $this, 'user_profile_menu' ), 5     );
 
    // Create the Profile Navigation (Profile/Extended Profile).
    add_action( 'edit_user_profile',        array( $this, 'profile_nav'       ), 99, 1 );
    add_action( 'show_user_profile',        array( $this, 'profile_nav'       ), 99, 1 );
 
    // Editing users of a specific site.
    add_action( "admin_head-site-users.php", array( $this, 'profile_admin_head' ) );
 
    // Add a row action to users listing.
    if ( bp_core_do_network_admin() ) {
        add_filter( 'ms_user_row_actions',        array( $this, 'row_actions'                    ), 10, 2 );
        add_action( 'admin_init',                 array( $this, 'add_edit_profile_url_filter'    )        );
        add_action( 'wp_after_admin_bar_render'array( $this, 'remove_edit_profile_url_filter' )        );
    }
 
    // Add user row actions for single site.
    add_filter( 'user_row_actions', array( $this, 'row_actions' ), 10, 2 );
 
    // Process changes to profile type.
    add_action( 'bp_members_admin_load', array( $this, 'process_member_type_update' ) );
 
    /** Signups **********************************************************
     */
 
    if ( is_admin() ) {
 
        // Filter non multisite user query to remove sign-up users.
        if ( ! is_multisite() ) {
            add_action( 'pre_user_query', array( $this, 'remove_signups_from_user_query' ), 10, 1 );
        }
 
        // Reorganise the views navigation in users.php and signups page.
        if ( current_user_can( $this->capability ) ) {
            $user_screen = $this->users_screen;
 
            /**
             * Users screen on multiblog is users, but signups
             * need to be managed in the network for this case
             */
            if ( bp_is_network_activated() && bp_is_multiblog_mode() && false === strpos( $user_screen, '-network' ) ) {
                $user_screen .= '-network';
            }
 
            add_filter( "views_{$user_screen}", array( $this, 'signup_filter_view'    ), 10, 1 );
            add_filter( 'set-screen-option',    array( $this, 'signup_screen_options' ), 10, 3 );
        }
 
        // Registration is turned on.
        add_action( 'update_site_option_registration'array( $this, 'multisite_registration_on' ),   10, 2 );
        add_action( 'update_option_users_can_register', array( $this, 'single_site_registration_on' ), 10, 2 );
        add_action( 'update_option_bp-enable-site-registration', array( $this, 'bp_registration_update_option' ), 10, 2 );
        add_action( 'admin_init', array( $this, 'bp_update_registration_update_option' ), 10 );
    }
 
    /** Users List - Members Types ***************************************
     */
 
    if ( is_admin() && bp_get_member_types() ) {
 
        // Add "Change type" <select> to WP admin users list table and process bulk members type changes.
        add_action( 'restrict_manage_users', array( $this, 'users_table_output_type_change_select' ) );
        add_action( 'load-users.php',        array( $this, 'users_table_process_bulk_type_change'  ) );
 
        // Add the profile type column to the WP admin users list table.
        add_filter( 'manage_users_columns',       array( $this, 'users_table_add_type_column'    )        );
        add_filter( 'manage_users_custom_column', array( $this, 'users_table_populate_type_cell' ), 10, 3 );
 
        // Filter WP admin users list table to include users of the specified type.
        add_filter( 'pre_get_users', array( $this, 'users_table_filter_by_type' ) );
    }
}

Changelog

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