Opened 2 months ago
Last modified 7 weeks ago
#23836 new defect (bug)
add_submenu_page() duplicate menus
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Administration | Version: | |
| Severity: | major | Keywords: | |
| Cc: |
Description
Creating two sub-menus with the same "menu slug" using add_submenu_page() should create only the last sub-menu.
But it creates two sub-menus with the same "menu slug".
Based on documentation "menu slug" should be unique for each sub-menu.
Change History (2)
Note: See
TracTickets for help on using
tickets.

While it should be unique, I don't think the behavior you're seeing is necessarily a bug. The function is "add", not "update". If you want to replace a menu, remove it then add it.