bp_members_type_admin_menu()

Create Users submenu to manage BuddyPress types.


Source Source

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

function bp_members_type_admin_menu() {
	if ( ! bp_is_root_blog() ) {
		return;
	}

	if ( bp_is_network_activated() && ! bp_is_multiblog_mode() && is_network_admin() ) {
		// Adds a users.php submenu to go to the root blog Member types screen.
		$member_type_admin_url = add_query_arg( 'taxonomy', bp_get_member_type_tax_name(), get_admin_url( bp_get_root_blog_id(), 'edit-tags.php' ) );

		add_submenu_page(
			'users.php',
			__( 'Member Types', 'buddypress' ),
			__( 'Member Types', 'buddypress' ),
			'bp_moderate',
			esc_url( $member_type_admin_url )
		);

	} elseif ( ! is_network_admin() ) {
		add_submenu_page(
			'users.php',
			__( 'Member Types', 'buddypress' ),
			__( 'Member Types', 'buddypress' ),
			'bp_moderate',
			basename( add_query_arg( 'taxonomy', bp_get_member_type_tax_name(), bp_get_admin_url( 'edit-tags.php' ) ) )
		);
	}
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.