get_options(); //40Nuggets top level menu $this->main_menu(); if (!empty($options->akl)){ //link sub-menus $this->sub_menus(); add_action('admin_head', array(&$this, 'open_links_in_new_tab')); //switch account submenu $this->switch_accont(); } } //open submenu links in new tab public function open_links_in_new_tab() { ?> getURL("dashboard")); $submenu['40Nuggets'][1] = array( 'Add New Nugget', 'manage_options' , $plugin->getURL("nuggets/editor")); $submenu['40Nuggets'][2] = array( 'Upgrade to Pro', 'manage_options' , $plugin->getURL("billing")); } private function switch_accont() { add_submenu_page( '40Nuggets', // Register this submenu with the menu defined above 'Switch Account', // The text to the display in the browser when this menu item is active 'Switch Account', // The text for this menu item 'administrator', // Which type of users can see this menu '40Nuggets-login', // The unique ID - the slug - for this menu item array(&$this, 'submenu_login_page_display') // The function used to render the menu for this page to the screen ); } public function submenu_login_page_display() { require_once ('login.php'); } } ?>