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_Admin::setup_actions()

Set up the admin hooks, actions, and filters.

Description

Source

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

137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
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
private function setup_actions() {
 
    /* General Actions ***************************************************/
 
    // Add some page specific output to the <head>.
    add_action( 'bp_admin_head',            array( $this, 'admin_head'  ), 999 );
 
    // Add menu item to settings menu.
    add_action( bp_core_admin_hook(),       array( $this, 'site_admin_menus' ), 68 );
    add_action( bp_core_admin_hook(),       array( $this, 'admin_menus' ), 5 );
    //add_action( bp_core_admin_hook(),       array( $this, 'admin_menus_components' ), 75 );
    add_action( bp_core_admin_hook(),       array( $this, 'adjust_buddyboss_menus' ), 100 );
 
    // Enqueue all admin JS and CSS.
    add_action( 'bp_admin_enqueue_scripts', array( $this, 'admin_register_styles' ), 1 );
    add_action( 'bp_admin_enqueue_scripts', array( $this, 'admin_register_scripts' ), 1 );
    add_action( 'bp_admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
 
    /* BuddyPress Actions ************************************************/
 
    // Load the BuddyPress metabox in the WP Nav Menu Admin UI.
    add_action( 'load-nav-menus.php', 'bp_admin_wp_nav_menu_meta_box' );
 
    // Add settings.
    add_action( 'bp_register_admin_settings', array( $this, 'register_admin_settings' ), 5 );
 
    // Add integrations
    add_action( 'bp_register_admin_integrations', array( $this, 'register_admin_integrations' ), 5 );
 
    // Add a description of new BuddyPress tools in the available tools page.
    add_action( 'tool_box',            'bp_core_admin_available_tools_intro' );
    add_action( 'bp_network_tool_box', 'bp_core_admin_available_tools_intro' );
 
    // On non-multisite, catch.
    add_action( 'load-users.php', 'bp_core_admin_user_manage_spammers' );
 
    // Emails.
    add_filter( 'manage_' . bp_get_email_post_type() . '_posts_columns',       array( $this, 'emails_register_situation_column' ) );
    add_action( 'manage_' . bp_get_email_post_type() . '_posts_custom_column', array( $this, 'emails_display_situation_column_data' ), 10, 2 );
 
    // Hello BuddyBoss/AppBoss.
    add_action( 'admin_footer', array( $this, 'about_buddyboss_screen' ) );
    add_action( 'admin_footer', array( $this, 'about_appboss_screen' ) );
 
    /* Filters ***********************************************************/
 
    // Add link to settings page.
    add_filter( 'plugin_action_links',               array( $this, 'modify_plugin_action_links' ), 10, 2 );
    add_filter( 'network_admin_plugin_action_links', array( $this, 'modify_plugin_action_links' ), 10, 2 );
 
    // Add "Mark as Spam" row actions on users.php.
    add_filter( 'ms_user_row_actions', 'bp_core_admin_user_row_actions', 10, 2 );
    add_filter( 'user_row_actions',    'bp_core_admin_user_row_actions', 10, 2 );
 
    // Emails
    add_filter( 'bp_admin_menu_order', array( $this, 'emails_admin_menu_order' ), 20 );
 
    // Add the separator above the BuddyBoss in admin.
    add_filter( 'menu_order', array( $this, 'buddyboss_menu_order' ) );
 
    // Add the separator above the plugins in admin.
    add_filter( 'menu_order', array( $this, 'buddyboss_plugins_menu_order' ) );
 
    // DeRegisters jquery-ui-style from the WP Job Manager plugin in WP admin /wp-admin/admin.php?page=bp-profile-setup page.
    add_action('admin_enqueue_scripts', array( $this, 'deregister_wp_job_manager_shared_assets' ) , 21 );
 
}

Changelog

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