Created
July 10, 2014 08:56
-
-
Save fazlurr/f6d7bff8a83223bd42bf to your computer and use it in GitHub Desktop.
add_menu_page with different name for first submenu item - http://wordpress.stackexchange.com/questions/66498/add-menu-page-with-different-name-for-first-submenu-item
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('admin_menu','order_admin_menu'); | |
function order_admin_menu() { | |
add_menu_page('Orders', 'Orders', 'manage_options', 'dp-order/order-list.php', '', plugin_dir_url( __FILE__ ).'icon.png'); | |
add_submenu_page('dp-order/order-list.php', 'Orders', 'All Orders', 'manage_options', "dp-order/order-list.php", ""); | |
add_submenu_page('dp-order/order-list.php', 'Reports', 'Reports', 'manage_options', "dp-order/order-report.php", ""); | |
add_submenu_page('', '', '', 'manage_options', "dp-order/order.php", ""); | |
add_submenu_page('', '', '', 'manage_options', "dp-order/update.php", ""); | |
add_submenu_page('', '', '', 'manage_options', "dp-order/delete.php", ""); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment