bp_core_modify_admin_menu_highlight()

This tells WP to highlight the Settings > BuddyPress menu item, regardless of which actual BuddyPress admin screen we are on.


Description Description

The conditional prevents the behavior when the user is viewing the backpat "Help" page, the Activity page, or any third-party plugins.


Source Source

File: bp-core/admin/bp-core-admin-functions.php

function bp_core_modify_admin_menu_highlight() {
	global $plugin_page, $submenu_file;

	// This tweaks the Settings subnav menu to show only one BuddyPress menu item.
	if ( ! in_array( $plugin_page, array( 'bp-activity', 'bp-general-settings', ) ) ) {
		$submenu_file = 'bp-components';
	}

	// Network Admin > Tools.
	if ( in_array( $plugin_page, array( 'bp-tools', 'available-tools' ) ) ) {
		$submenu_file = $plugin_page;
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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