BP_Admin::bp_add_main_menu_page_admin_menu()
Register network-admin nav menu elements.
Description
Contextually hooked to network-admin depending on current configuration.
Source
File: bp-core/classes/class-bp-admin.php
public function bp_add_main_menu_page_admin_menu() { global $menu; // Bail if user cannot moderate. if ( ! bp_current_user_can( 'manage_options' ) ) { return; } // Add BuddyBoss Menu separator above the BuddyBoss and below the BuddyBoss if ( bp_current_user_can( 'manage_options' ) ) { $menu[] = array( '', 'read', 'separator-buddyboss', '', 'wp-menu-separator buddyboss' ); // WPCS: override ok. $menu[] = array( '', 'read', 'separator-plugins', '', 'wp-menu-separator plugins' ); // WPCS: override ok. } $hooks = array(); if ( is_multisite() && bp_is_network_activated() && ! bp_is_multiblog_mode() ) { $hooks[] = add_menu_page( __( 'BuddyBoss', 'buddyboss' ), __( 'BuddyBoss', 'buddyboss' ), $this->capability, $this->settings_page, 'bp_core_admin_backpat_menu', buddypress()->plugin_url . 'bp-core/images/admin/icons/logos/buddyboss.svg', 3 ); } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.2.3 | 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.