bbp_tools_modify_menu_highlight

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

Description

bbp_tools_modify_menu_highlight(); 

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


Usage

  1. if ( !function_exists( 'bbp_tools_modify_menu_highlight' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/admin/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_tools_modify_menu_highlight(); 
  7.  

Defined (1)

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

/includes/admin/functions.php  
  1. function bbp_tools_modify_menu_highlight() { 
  2. global $plugin_page, $submenu_file; 
  3.  
  4. // This tweaks the Tools subnav menu to only show one bbPress menu item 
  5. if ( ! in_array( $plugin_page, array( 'bbp-settings' ) ) ) 
  6. $submenu_file = 'bbp-repair';