[wp-hackers] Hello, new developer with a question
Callum Macdonald
lists.automattic.com at callum-macdonald.com
Sat Nov 17 20:04:40 GMT 2007
Hey Derek,
I'm pretty sure add_menu_page() doesn't add a child page. So you could
simply add a child page with the same page name and function, but a
different title.
However, if it does add a child page automatically, hook into the
'admin_menu' action and manually edit the $menu and $submenu variables.
You can see how they're structured in wp-admin/menu.php - it's pretty
straightforward.
Cheers,
Callum.
Derek Hogue wrote:
> Hey all,
>
> I'm just wrapping up work on my first WP plug-in, but there's one
> thing I can't figure out.
>
> I'm adding a top-level menu (as I have 5 child pages), but what I'd
> love to do is have the top-level menu name and the corresponding
> sub-level menu name be different - in the same way that clicking on
> "Write" takes you to the sub-menu called "Write Post".
>
> Is this doable within the plug-in API? Any ideas or help would be grand.
>
> I've searched around, but can't find any discussion of this online or
> in the archives of this list.
>
> Thanks!
> Derek
> --
> http://amphibian.info
>
>
>
> _______________________________________________
> 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