[wp-hackers] find wp-config from a plugin file

Pixline supporto at pixline.net
Tue Jan 29 11:51:11 GMT 2008


Hi all,

first thing, I'd like to introduce you to the new alpha version of  
Gengo [0], ported to WordPress 2.3. Now it almost works! :-)

Afther that: if the plugin file is loaded as ajax it needs to know the  
ABSPATH, and the original author did it like this:

if (!defined('ABSPATH'))
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/wp- 
config.php');

this usually works, but don't work if wordpress is installed in a  
different way, as you can see in [1]. There's a better and safer way  
to find that file? I can't find anything better...

By the way, if some of you can get in touch with Jamie Talbot please  
teach me how to do it, I'm trying since october without success. While  
I'm getting embarassed by this fork-that-is-not-a-fork, I'd love to  
talk with him and maybe merge our effort with the regular codebase on  
wordpress.org. But I couldn't find a working email address.. :-|

Thank you!
Paolo

[0] http://code.google.com/p/gengo-wp23/
[1] http://code.google.com/p/gengo-wp23/issues/detail?id=34


More information about the wp-hackers mailing list