你说得对,但你需要等待WordPress 3.1的实际实现。如果您不能等待,可以将“show\\u in\\u menu”更改为false,并使用add\\u submenu\\u page()函数将“argus”定义为首页,并在argus Admin菜单下“手动”添加访问者。
因此,您的代码是:
$v_args = array(
\'labels\' => array (
\'name\' => \'Visitors\',
\'singular_name\' => \'Visitor\',
\'add_new_item\' => \'Register New Visitor\',
),
\'public\' => true,
\'publicly_queryable\' => false,
\'exclude_from_search\' => true,
\'show_ui\' => true,
\'show_in_menu\' => \'flase\',
\'hiearchical\' => false,
\'supports\' => array( \'\' ),
\'register_meta_box_cb\' => array ( &$this, \'_wp_visitor_meta_box_cb\' ),
);
register_post_type( $post_type, $v_args );
然后
add_menu_page( \'Argus\', \'Argus Admin\', \'manage_options\', \'argus\', array( &$this, \'_wp_argus_main_panel\' ), \'\', -1 );
add_submenu_page( argus, \'Visitors\', \'Visitors\', \'manage_options\' , \'visitors\' , \'edit.php?post_type=visitors\');
希望这有帮助