rodrigoprimo / social-connect

WordPress plugin for signup/login using social media providers.
http://wordpress.org/extend/plugins/social-connect/
GNU General Public License v3.0
73 stars 40 forks source link

Fixes issues that prevented activation of plugin when WordPress is not in the default directory. #18

Closed navitronic closed 10 years ago

navitronic commented 12 years ago

Uses ABSPATH to ensure that the scripts can find the wp-load.php file in WordPress installations that keep WordPress in a different folder.

thenbrent commented 12 years ago

I haven't tested this yet, but ABSPATH is defined in wp-load.php so not sure how it could work when wp-load.php isn't already loaded: https://github.com/WordPress/WordPress/blob/master/wp-load.php#L22

I would also prefer rewrite the whole darn thing so it handles things in WP instead of using the dirty dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) ) hack...

navitronic commented 12 years ago

Ah ha... you're right, I was digging through this, this morning and think I got a touch confused on where it was being defined. Ooops.

I guess it wasn't giving me an error, because I think when you come to require wp-load.php, in most cases it is already loaded. Are there cases where it isn't loaded and needs to be?

But yeah, lets just say this doesn't play nicely with WordPress in a subdirectory as it stands currently.

rodrigoprimo commented 10 years ago

Closing this issue as in b3b42ab0ebaa9b1109ddc7063eb2d8be68003fb1 I have removed all the direct calls to wp-load.php. Thanks for reporting the problem.