[wp-hackers] Real Menu/Submenu Hooks (patch)
Ryan Boren
ryan at boren.nu
Sat Sep 11 17:42:31 UTC 2004
On Sat, 2004-09-11 at 12:37 -0500, Matt Mullenweg wrote:
> Robert Deaton wrote:
> > I'm not sure if I quite understood what you meant. You do get to
> > specify under which parent submenu's go, but right now choosing where
> > exactly in the menu or submenu's you want it is unsupported, since it
> > would require a ton of tweaking and in my opinion is rather
> > unneccessary.
>
> Well the point of putting this into a function would be to allow people
> to, say, put a menu item in between Users and Options without the
> possibility of conflict with another plugin trying to go in the exact same
> spot.
>
> > Also, you could be right about allowing people to hook into the main
> > admin menu, but submenus at least should be supported in my opinion,
> > that way you can speicify plugin option pages.
>
> Which is currently possible
>
> $submenu['plugins.php'][] = array('My Plugin', 5, 'my-plugin.php');
>
> It would be a little silly to have a function to do just that.
I prefer a function because it abstracts the data structure. If we get
rid of or reorganize $submenu, plugins won't be affected. Plus, a
function looks purtier.
Ryan
> However
> Ryan's suggestion is still valid because it is possible (and likely) that,
> for example, the first item under Options won't be options-general.php
> forever, so if you tried to put something into the options submenu it
> would disappear.
>
More information about the hackers
mailing list