bbp_tools_modify_menu_highlight()

This tells WP to highlight the Tools > Forums menu item, regardless of which actual Forums Tools screen we are on.

Description

The conditional prevents the override when the user is viewing settings or any third-party plugins.

Source

File: bp-forums/admin/functions.php

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

	// This tweaks the Tools subnav menu to only show one Forums menu item
	if ( ! in_array( $plugin_page, array( 'bbp-settings' ) ) )
		$submenu_file = 'bbp-repair';
}

Changelog

Changelog
Version Description
bbPress (r3888) 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.