[wp-hackers] 2.7 Wireframes

Ozh ozh at planetozh.com
Wed Oct 15 11:36:36 GMT 2008


>> (2) I am looking forward to seeing these new 'icons' on the top 
>> level menus.
>> Is there going to be an API to allow plugins to define their own?
>
> Good question.  I haven't thought about it yet. Ideas on API?

For what it's worth, this is something I've implemented in my Admin Drop 
Down plugin, where other plugins can define their own icon in the menus.

I think the ideal API for plugins should be something like:
add_filter('menu_icon', 'myplugin_icon');
function myplugin_icon($plugin) {
        if ($plugin == plugin_basename(__FILE__))
                return 'url/to/icon.png';
        return $plugin;
}

Ozh
-- 
http://planetozh.com/





More information about the wp-hackers mailing list