BP_Admin::buddyboss_plugins_menu_order( int $menu_order )
Add the separator above the plugins menu in admin.
Description
Parameters
- $menu_order
-
(Required) Menu order.
Return
(array)
Source
File: bp-core/classes/class-bp-admin.php
public function buddyboss_plugins_menu_order( $menu_order ) { // Initialize our custom order array. $plugins_menu_order = array(); // Get the index of our custom separator. $plugins_separator = array_search( 'separator-plugins.php', $menu_order, true ); // Loop through menu order and do some rearranging. foreach ( $menu_order as $index => $item ) { if ( 'plugins.php' === $item ) { $plugins_menu_order[] = 'separator-plugins'; $plugins_menu_order[] = $item; unset( $menu_order[ $plugins_separator ] ); } elseif ( ! in_array( $item, array( 'separator-plugins' ), true ) ) { $plugins_menu_order[] = $item; } } // Return order. return $plugins_menu_order; }
Changelog
Version | Description |
---|---|
BuddyBoss 1.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.