bp_activity_admin_menu_order

Add activity component to custom menus array.

Description

(array) bp_activity_admin_menu_order( (array) $custom_menus = array() ); 

Several BuddyPress components have top-level menu items in the Dashboard, which all appear together in the middle of the Dashboard menu. This function adds the Activity page to the array of these menu items.

Returns (array)

$custom_menus List of top-level BP menu items, with Activity added.

Parameters (1)

0. $custom_menus — Optional. (array) => array()
The list of top-level BP menu items.

Usage

  1. if ( !function_exists( 'bp_activity_admin_menu_order' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-admin.php'; 
  3.  
  4. // The list of top-level BP menu items. 
  5. $custom_menus = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_activity_admin_menu_order($custom_menus); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-activity/bp-activity-admin.php  
  1. function bp_activity_admin_menu_order( $custom_menus = array() ) { 
  2. array_push( $custom_menus, 'bp-activity' ); 
  3. return $custom_menus;