[wp-hackers] Programatically retrieve settings page link?

Otto otto at ottodestruct.com
Tue Jun 10 13:34:57 GMT 2008

On Tue, Jun 10, 2008 at 7:35 AM, Stephen Rider
<wp-hackers at striderweb.com> wrote:
> That I know.  The question is:
>> It uses the parent script...
> What is "it"?

Perhaps we don't understand your question? When I add, say, a page on
top of plugins.php, I do it like this:

add_submenu_page('plugins.php', __('My Plugin Configuration'), __('My
Plugin Configuration'), 'manage_options', 'my-plugin-config',

The resulting URL for this is "plugins.php?page=my-plugin-config".
Both of those come from that call I just made. The plugins.php is the
first parameter, the "my-plugin-config" is the fifth. If you look at,
say, "add_options_page", then it's just doing the same call but with

The code that builds those URLs in the menu-header.php file, and it's
not a function you can call or anything, it's building it just like
that. Line 150 or thereabouts in 2.5.1.


More information about the wp-hackers mailing list