yeap, and its all explained here : http://codex.wordpress.org/Writing_a_Plugin#Adding_Administration_Panels
if that doesnt help you can always look at how its done in the core, though that link helped me far more than what I saw in the core did.
thanks for the reply but I think you misunderstood me. I’ve already installed both a.php and b.php as menu items. I just want to create an html link on a.php that, when clicked, loads up b.php. It’s easy enough to do the following
Link but I was wondering if there was a wrapper function for creating the url.
mm, so you mean that if i were to install the 2 files they would work inside my wp-admin without further editing?
if you were to use a $link variable of some kind, there all kinds of path variables available.
Something like, get_bloginfo ought to get you started on the path..
Is that more what you mean?
Most plugins that ive seen (i am assuming your talking about a plugin since thats where this is posted) end up using a variable and then tacking on the necessary stuff, either through more variables or not.
$link = $link . '" href="' . get_bloginfo('comments_rss2_url') . '" />'; for example.
I’m writing a plugin, say I want a product management system built into wordpress. I might have a page prodlist.php which will display all my products, not unlike the manage->post/page in the standard wordpress admin application. Next to each product, I have an edit button which, when pressed, lets me edit the product details. The edit page is say prodedit.php, is installed as a submenu item in the admin application and can be found by following the following link: mydomain.com/wp-admin/admin.php?page=foo. It would make sense to me that the wordpress developers would have written a wrapper function such as get_menu_url(“foo”) which would create the link above.
I don’t think that get_bloginfo helps as it gives blog specific content and does not deal with the admin application.
This is not a serious issue as I can simply hardcode the link but a level of abstraction would be nice.
Thanks for your responses so far.
No, there is no such function. What you do is to build the link yourself, like so: get_settings('siteurl')."/wp-admin/admin.php?page=foo"
For a working blog, the siteurl setting must point to the blog itself. Then you can add on the necessary bits to get your page.
If you want to abstract that sort of thing into a single function in your plugin, feel free.
Thanks for the reply Otto42