[wp-hackers] 2 page sin admin with one plugin

Alan Castonguay alan at verselogic.net
Mon Dec 1 14:17:17 GMT 2008

The parameter that you use __FILE__  in doesn't have to actually be a  
filename, only a unique value. You can base it on a filename if you  
want, but any unique opaque string is fine.


Sent from my iPhone

On 1-Dec-08, at 8:53, "Frank Bueltge" <frank at bueltge.de> wrote:

> Hello,
> how it is possible to use two or more different pages in the
> admin-area with one plugin.
> when i set a options and statistic page via hook to the admin, all
> functions are in one php-file, the is the hover-effekt in the new menu
> of 2.7 on the two different points.
> add_submenu_page( 'index.php', __('Test', 'test'), $menutitle .
> $menutitle_count, get_option('level'), __FILE__, 'display_stats' );
> add_options_page( __('Settings Test', 'test'), $menutitle, 9,
> __FILE__, 'admin_option_page' );
> Thanks for your help!
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list