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
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
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.