[wp-hackers] Best practice: access plugins php files

Lox lox.dev at knc.nc
Wed Aug 11 02:57:41 UTC 2010


2010/8/11 John Blackbourn <johnbillion+wp at gmail.com>:
> I personally use the following to get the location of my plugin:
>
> $plugin_dir = WP_PLUGIN_URL . '/' . basename( dirname( __FILE__ ) );
>
> Then your file would be at:
>
> $plugin_dir . '/help.php?field=password';

I know how to get the url to my plugins, thks.

So it seems the best practice is to access plug-ins scripts directly
when needed. I was just wondering if there was a sort of wrapper to
achieve it. Seems there is not. Thanks.

2010/8/11 Aaron Jorbin <aaron at jorb.in>:
> Why not stay consistent with the rest of the WordPress experience and use
> add_contextual_help ?
>
> http://phpxref.ftwr.co.uk/wordpress/wp-admin/includes/template.php.source.html#l3670

Because the help system I talk about is located in the front-end ....
And, come on, it is just an example ...

-- 
Lox
lox.dev at knc.nc


More information about the wp-hackers mailing list