I'm trying to create (well have created) a top-level menu for my plugin, as it will have a number of configurable sections.
The functions for adding sub-menus as described in the codex work in MU, but not the top-level menus.
To test this, copy the example script from the codex page and put it in the mu-plugins folder.
Tracing back through the source (Zend Studio's 'Go To Declaration' is great!!) brings me to the plugin_page_hook method where it seems to be dependent on the plugin being in the /plugins/ not /mu-plugins/.
My workaround was to declare my menu settings into the global $menu variable (being careful not to clobber other existing menus).
add_action('admin_menu','addmenu');
function addmenu() {
global $submenu, $menu;
$menu[2] = array(__('Premium Blogs'), 'premium', 'premium.php');
$submenu['premium.php'][0] = array( __('Main'), '10', 'premium.php' );
$submenu['premium.php'][1] = array( __('Plugins'), '10', 'premium-plugins.php' );
}
This means, however, that I need to create menu pages that have to be placed in the wp-admin directory. Also I am potentially clobbering any other menu that is placed at index 2 in the top level menu.