📜  wp 添加菜单页面和子页面 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:07.735000             🧑  作者: Mango

代码示例1
1
2
3
$menu_slug = 'wpdocs-orders-slug';
add_menu_page( 'WP Docs Orders', 'WP Docs Orders', 'read', $menu_slug, false );
add_submenu_page( $menu_slug, 'Existing WP Docs Orders', 'Existing WP Docs Orders', 'read', $menu_slug, 'wpdocs_orders_function' );