[wp-hackers] Admin menu hook

Trevor Turk trevorturk at yahoo.com
Sat Dec 4 04:24:19 UTC 2004


> add_options_page(__("Test Page"), __('Test'), 5,
> dirname(__FILE__) .
> 'testpage.php');
> 
> Doing this plus using relative includes allows the
> plugin and all of its
> files to be installed directly into plugins/ or into
> a subdirectory of
> plugins.  The name of the subdirectory doesn't
> matter.

I tried this:

add_submenu_page(__("test.php"), __("Test"),
__('Edit'), 5, '../wp-content/plugins/test/php');

but it doesn't work. If I replace "plugins" with
"plugin", it does. This seems odd to me...?

Trevor




More information about the hackers mailing list