[wp-hackers] Real Menu/Submenu Hooks (patch)

Matt Mullenweg m at mullenweg.com
Sat Sep 11 17:37:51 UTC 2004


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. 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.

-- 
Matt Mullenweg
  http://photomatt.net | http://wordpress.org
http://pingomatic.com | more soon...




More information about the hackers mailing list