Feb 23

The Problem

If you are using my Help Desk Plugin or my Terms Of Use Plugin with WordPress MU 2.7 you will notes there is an error with the sub menus.

There is a small bug in WPMU 2.7 menu-header.php. The problem is that the link that’s generated for the submenu is not of the form admin.php?page=submenu.php, but instead, it’s of the form toplevelmenu.php?page=submenu.php

The Simple Fix

In menu-header.php on line 122
[scrolldiv]

$parent_exists = (!$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/{$item[2]}") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}") ) || file_exists($item[2]) || ( file_exists( WPMU_PLUGIN_DIR . "/{$item[2]}" ) && ! is_dir( WPMU_PLUGIN_DIR . "/{$item[2]}" ) );

[/scrolldiv]
should be:
[scrolldiv]

$parent_exists = !$admin_is_parent && ((file_exists(WP_PLUGIN_DIR . "/{$item[2]}") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}") ) || file_exists($item[2]) || ( file_exists( WPMU_PLUGIN_DIR . "/{$item[2]}" ) && ! is_dir( WPMU_PLUGIN_DIR . "/{$item[2]}" ) ));

[/scrolldiv]
Note the different grouping of conditions, hopeful this problem will be resolved in 2.7.1.