[wp-hackers] How to find the URL to a plugin profile page?

Knut-Olav Hoven hovenko at linpro.no
Mon Feb 26 14:52:55 GMT 2007

I have a plugin that calls the add_submenu_page(..) function to add a page to 
profile.php, to enable users to select their home location/city.

        'Change location',
        'Your location',
        __FILE__ . "/user_profile",
        array(&$this, 'user_profile'));

The menu item shows up in the admin menu bar, as expected.

When an administrator is logged in the URL 
is "wp-admin/users.php?page=user_locations/user_locations.php/user_profile", 
but when a normal user is logged in the URL 
becomes "wp-admin/profile.php?page=user_locations/user_locations.php/user_profile", 
because the normal user does not have permissions to list all users.

The problem is that i need to create a link on the front page to send the user 
to this admin page. I do not want to test if the user is at a certain user 
level, because that might change later and break my plugin.

Any suggestions?

Knut-Olav Hoven
Systemutvikler               mob: +47 986 71 700
Linpro AS                    http://www.linpro.no/

More information about the wp-hackers mailing list