[wp-trac] [WordPress Trac] #5100: Allow top level's first submenu
title to differ from top level menu's name
WordPress Trac
wp-trac at lists.automattic.com
Sat Sep 29 11:03:14 GMT 2007
#5100: Allow top level's first submenu title to differ from top level menu's name
----------------------------+-----------------------------------------------
Reporter: Viper007Bond | Owner: anonymous
Type: enhancement | Status: new
Priority: low | Milestone: 2.4
Component: Administration | Version: 2.3
Severity: minor | Keywords: needs-patch
----------------------------+-----------------------------------------------
If you create a top level menu and then a submenu page under it, a submenu
page with the title of the top level menu is automatically created as the
first tab. It'd be nice if this submenu's title could differ from that of
top level menu (like the official menus do with "Options > General").
I was thinking a good way to do this would be to have the ability of
`add_menu_page()`'s title vars to be arrays. However, I've discovered that
the submenu is automatically created when the 2nd submenu is added, not
when the top level menu is made.
So a few ideas, both of which revolve around my array idea.
The first is that `add_menu_page()` takes the extra titles set via the
array and stores them for later usage. When the submenu is automatically
created by `add_submenu_page()`, those titles are used.
The second is that `add_menu_page()` automatically creates a submenu page
on it's own (with the code from `add_submenu_page()` removed), but when a
top level menu only has one submenu item, the submenu bar is hidden.
Any thoughts on this proposal? Anyone have any better solutions?
--
Ticket URL: <http://trac.wordpress.org/ticket/5100>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list