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

Ryan Boren ryan at boren.nu
Sat Sep 11 17:20:19 UTC 2004


On Sat, 2004-09-11 at 12:08 -0500, Matt Mullenweg wrote:
> Robert Deaton wrote:
> > Unsatisfied with using $menu[23]= as a hook for adding items to the
> > admin menu, I wrote a patch for the latest CVS to use real hooks. It
> > also has hooks for the submenus.
> 
> Does this allow you to say where the menu item goes? Otherwise it's pretty 
> much equivalent to something like
> 
> $menu['edit.php'][] = ....
> 
> Whether people should be sticking stuff on the main menu at all is another 
> issue. Perhaps it would be better not to encourage this behaviour for the 
> main menu and allow the submenu to be modified as demonstrated.

Perhaps plugins that want to add their own, separate management pages
should add them to a submenu under "Plugins" with something like
add_plugin_page().  Also, we could provide plugin-header.php and plugin-
footer.php for inclusion by these pages.  Another possible spot is in
the options menu.  add_option_page(), option-header.php, ...

Ryan




More information about the hackers mailing list