[wp-hackers] Definitive way of getting path to plugin
John Blackbourn
johnbillion+wp at gmail.com
Fri Nov 23 02:51:19 GMT 2007
On Nov 23, 2007 2:18 AM, Rob Miller <r at robm.me.uk> wrote:
>
> basename(dirname(__FILE__))
>
> ...should work, returning "foo" for the file
> "wp-content/plugins/foo/foo.php". That only works from within your
> plugin directory, of course, but it should sort you out in most instances.
Mr Miller, I thank you! That's exactly what I was looking for.
More information about the wp-hackers
mailing list