[wp-hackers] Programatically retrieve settings page link?
viper at viper007bond.com
Sat Jun 7 09:17:55 GMT 2008
Use a stub rather than your plugin's path/filename and then just hardcode
add_options_page( 'My Plugin', 'My Plugin', 'manage_options',
'your-plugin-stub', 'myfunction' );
On Fri, Jun 6, 2008 at 11:10 PM, Stephen Rider <wp-hackers at striderweb.com>
> Hi all --
> Is there a way to automatically get a plugin page link, e.g.
> I'm adding a "Settings" link in the Plugins page. At the moment I'm
> hard-coding it; I would prefer some sort of reusable code that figures the
> link out itself.
> Setting $page = add_submenu_page... returns (in this case)
> 'design_page_pull-quotes' which isn't going to work.
> Any ideas?
> Stephen Rider
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
Viper007Bond | http://www.viper007bond.com/ | http://www.finalgear.com/
More information about the wp-hackers