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

Robert Deaton false.hopes at gmail.com
Sat Sep 11 16:53:09 UTC 2004


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.

Basics:
add_submenu_item($parent, $title, $userlevel, $file)
Ex: add_submenu_item('options-general.php', 'My Plugin Options', '5',
'pluginfile.php');
add_menu_item($title, $userlevel, $file) 
Ex: add_menu_item('My Plugin Menu', '5', 'pluginfile.php);

You can even add submenu's for menus created using the hook.

The patch is attached or available on the web at
http://false-hopes.com/patches/menuhookpatch.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menuhookpatch.diff
Type: text/x-patch
Size: 8899 bytes
Desc: not available
Url : /pipermail/hackers_wordpress.org/attachments/20040911/d80fec8d/menuhookpatch.bin


More information about the hackers mailing list