Update: I've update the plugin doc and added a page for plugin coders.
I've just committed version 2.3 of the mother of all admin menu plugins, Admin Drop Down Menu, and there are some pretty hot stuff inside. Plugin coders, be sure to read this till the end.
First, it's finally ready for translation. That's something I've been asked a few times, so now polyglots can rejoice since there is a .pot file included. I've also added CSS classes and id's to all menu elements so styling maniacs can hack their stylesheet to death.
The most visible change will be optional menu icons. That's something I've been nagged about a gazillion times, and that I had never added because, well, I don't need them :) So, why add them now, you ask? Because I had a fun idea to implement!
The cool stuff with this release is there is sort of an API to play with. The function that builds the array that builds the menu is full of hooks so that if your plugin needs, for some reason, to modify menu entries, you don't have to write dirty patches, just throw some add_filters() in (hat tip to Kevin Behrens and his plugin Role Scoper for inspiring this)
But wait, there's more, and cooler!
Icons are stolen from the awesome FamFamFam, of course. By default, plugins get a cute green plugin icon, but this can get a bit boring when you have dozens of plugin entries looking the same. Plugin coders want their individuality!
Well, they can have it: there's an awesomely super cool hook that allows plugins to have their own icon! (I'm pretty excited with this feature:)

To do so, simply add the following in your plugin:
-
add_filter('ozh_adminmenu_icon', 'myplugin_icon');
-
-
function myplugin_icon($hook) {
-
if ($hook == 'myplugin') return 'http://url/to/cute/icon.png';
-
return $hook;
-
}
Where 'myplugin' is the $file argument used to add your administration page (for instance add_options_page('My Plugin', 'My Plugin', 10, 'myplugin', 'myplugin_do_stuff'))
If you use this cool feature in your plugin (or need help to do so) be sure to let me know!
Pages: [2] 1 » Show All
pingback on 20/Sep/08 at 8:06 pm # :
[...] Added filter for Admin Drop Down Menu [...]
wrote, on 22/Aug/08 at 2:59 am # :
Love the plugin, but weird glitch with the latest version -- after installing, I can't actually SEE anything but the top menu in my admin screen. It looks like it has loaded, but everything is just blank. I can go through the menus, but selecting anything doesn't actually load a page.
I'll check some stuff with some of my plugins, and it is possible it is an incompatibility with something on my end, but I just wanted to give you a heads up in case anyone else starts to report a similar issue.
pingback on 21/Aug/08 at 10:00 pm # :
[...] “Install a Plugin” and “Install a Theme”. (Writers block!) I used the new API of Ozh’s Admin Dropdown Menu plugin to add the icons, so make sure you install that fine [...]
wrote, on 21/Aug/08 at 8:58 pm # :
Just found that about 10 seconds ago - you are a LEGEND :-)