[wp-hackers] add_menu_page in 2.7RC1

andré renaut andre.renaut at gmail.com
Wed Dec 3 07:25:34 GMT 2008


Another point that is not documented

instead of

WP_PLUGIN_URL.'/eshop/eshop.png'

you can have the value

'div'

to be able to manage the menu icon with css ..


> Instead of __FILE__, you can use any arbitrary string.  Try this:
>
> add_menu_page(__('eShop','> eshop'), __('eShop','eshop'), $eshoplevel,
> 'eshop', 'eshop_admin_orders_stats',WP_PLUGIN_URL.'/eshop/eshop.png');
>
> On Dec 2, 2008, at 5:06 AM, Rich Pedley wrote:
>
> > Currently I use the following, which seems to work well, to add a top
> > level menu item:
> >
> > add_menu_page(__('eShop','eshop'), __('eShop','eshop'), $eshoplevel,
> > __FILE__, 'eshop_admin_orders_stats',WP_PLUGIN_URL.'/eshop/
> > eshop.png');
> >
> > However the link produced is like this:
> > admin.php?page=eshop/eshop.php


More information about the wp-hackers mailing list