invites_admin_menu_order( array $custom_menus = array() )

Add Invites menu item to custom menus array.

Description

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 Invites screen to the array of these menu items.

Parameters

$custom_menus

(Optional) The list of top-level BP menu items.

Default value: array()

Return

(array) $custom_menus List of top-level BP menu items, with Invites added.

Source

File: bp-invites/bp-invites-admin.php

function invites_admin_menu_order( $custom_menus = array() ) {

	array_push( $custom_menus, 'edit.php?post_type=' . bp_get_invite_post_type() );

	if ( is_network_admin() && bp_is_network_activated() ) {
		array_push(
			$custom_menus,
			get_admin_url( bp_get_root_blog_id(), 'edit.php?post_type=' . bp_get_invite_post_type() )
		);
	}

	return $custom_menus;
}

Changelog

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.