wordpress中有许多的函数我们需要熟稔于心。需要说明的是该方式语法与add_menu_page语法完全相同,不再赘述。但仅可以增加子菜单到对应系统内置的菜单,无法为自定义菜单增加子菜单。
add_dashboard_page($page_title, $menu_title, $capability, $menu_slug, $function);//增加子菜单到“仪表盘”
add_users_page($page_title, $menu_title, $capability, $menu_slug, $function);//增加子菜单到“用户”
add_plugins_page($page_title, $menu_title, $capability, $menu_slug, $function);//增加子菜单到“插件”
add_comments_page($page_title, $menu_title, $capability, $menu_slug, $function);//增加子菜单到“评论”
add_media_page($page_title, $menu_title, $capability, $menu_slug, $function);//增加子菜单到“媒体”
add_posts_page($page_title, $menu_title, $capability, $menu_slug, $function);//增加子菜单到“日志”
add_pages_page($page_title, $menu_title, $capability, $menu_slug, $function);//增加子菜单到“页面”
add_theme_page($page_title, $menu_title, $capability, $menu_slug, $function);//增加子菜单到“外观”
add_options_page($page_title, $menu_title, $capability, $menu_slug, $function);//增加子菜单到“设置”
add_links_page($page_title, $menu_title, $capability, $menu_slug, $function);//增加子菜单到“链接”