[wp-hackers] Access files inside a plugin directory?

Jeremy Clarke jer at simianuprising.com
Tue Mar 23 14:18:07 UTC 2010


On Mon, Mar 22, 2010 at 7:38 PM, scribu <scribu at gmail.com> wrote:
> URL: plugins_url('file_name', __FILE__);
>
> PATH: dirname(__FILE__) . '/file_name';

Is using __FILE__ an accepted practice in WP-land? I have many
installs where I use symlinks ( ln -s ) to share plugin/theme
directories between multiple installations, and any use of __file__
completely screws up file includes in that setup. Most plugins manage
to avoid it but the ones that use it need to be modified by hand.

Isn't it presumptive or something? Seems dangerous to have as a best practice.


-- 
Jeremy Clarke
Code and Design | globalvoicesonline.org


More information about the wp-hackers mailing list