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

Robert Deaton false.hopes at gmail.com
Sat Sep 11 17:43:13 UTC 2004


That, and it adds the items before the rest since the other $submenu
items haven't been declared yet, which isn't always a desirable
behavior. This way, it displays where it problably should, and yes, it
keeps plugins from breaking when there's newer versions that don't use
the same pages as the top menu like Matt said.

On Sat, 11 Sep 2004 12:37:51 -0500, Matt Mullenweg <m at mullenweg.com> 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. 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...
> 
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>



More information about the hackers mailing list